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 TypeMethodDescriptionvoid
addSubclassNames
(List<String> classAndSubs, JRubyClass classAnno) static void
checkForThrows
(TypeElement type, ExecutableElement method) void
emitIndexCode
(int bits, String names, String format) protected void
gatherMappings
(Map<CharSequence, List<ExecutableElement>> methods, Map<CharSequence, CharSequence> mappings) void
static String
getBaseName
(String[] names, ExecutableElement md) void
init
(ProcessingEnvironment processingEnv) boolean
process
(Set<? extends TypeElement> typeElements, RoundEnvironment roundEnvironment) void
void
void
processMethodDeclarations
(Map<CharSequence, List<ExecutableElement>> declarations) void
Methods 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:
init
in interfaceProcessor
- Overrides:
init
in classAbstractProcessor
-
process
- Specified by:
process
in interfaceProcessor
- Specified by:
process
in classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
processType
-
addSubclassNames
-
gatherMappings
protected void gatherMappings(Map<CharSequence, List<ExecutableElement>> methods, Map<CharSequence, CharSequence> mappings) -
emitIndexCode
-
processMethodDeclarations
-
processMethodDeclaration
-
processMethodDeclarationMulti
-
generateMethodAddCalls
-
checkForThrows
-
getBaseName
-