Package org.jruby.anno
Class AnnotationBinder
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.jruby.anno.AnnotationBinder
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes("org.jruby.anno.JRubyMethod")
public class AnnotationBinder
extends AbstractProcessor
Annotation processor for generating "populators" to bind native Java methods as Ruby methods, and
to gather a list of classes seen during compilation that should have their invokers regenerated.
NOTE: This class must ONLY reference classes in the org.jruby.anno package, to avoid forcing
a transitive dependency on any runtime JRuby classes.
-
Field Summary
FieldsFields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubclassNames(List<String> classAndSubs, JRubyClass classAnno) static voidcheckForThrows(TypeElement type, ExecutableElement method) voidemitIndexCode(int bits, String names, String format) protected voidgatherMappings(Map<CharSequence, List<ExecutableElement>> methods, Map<CharSequence, CharSequence> mappings) voidstatic StringgetBaseName(String[] names, ExecutableElement md) voidinit(ProcessingEnvironment processingEnv) booleanprocess(Set<? extends TypeElement> typeElements, RoundEnvironment roundEnvironment) voidvoidvoidprocessMethodDeclarations(Map<CharSequence, List<ExecutableElement>> declarations) voidMethods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
-
Field Details
-
POPULATOR_SUFFIX
- See Also:
-
SRC_GEN_DIR
- See Also:
-
-
Constructor Details
-
AnnotationBinder
public AnnotationBinder()
-
-
Method Details
-
init
- Specified by:
initin interfaceProcessor- Overrides:
initin classAbstractProcessor
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
processType
-
addSubclassNames
-
gatherMappings
protected void gatherMappings(Map<CharSequence, List<ExecutableElement>> methods, Map<CharSequence, CharSequence> mappings) -
emitIndexCode
-
processMethodDeclarations
-
processMethodDeclaration
-
processMethodDeclarationMulti
-
generateMethodAddCalls
-
checkForThrows
-
getBaseName
-