Package org.jruby.anno
Class IndyBinder
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.jruby.anno.IndyBinder
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes("org.jruby.anno.JRubyMethod")
public class IndyBinder
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final String
static final int
static final int
static final int
static final String
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
adaptHandle
(ExecutableElementDescriptor executableElementDescriptor, int implClass) void
emitIndexCode
(Integer bits, String names, String methodName) static long
encodeSignature
(int pre, int opt, int post, int kwargs, int requiredKwargs, boolean rest, boolean restKwargs) void
generateMethodAddCalls
(ExecutableElement md, JRubyMethod jrubyMethod) static long
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, init, isInitialized
-
Field Details
-
POPULATOR_SUFFIX
- See Also:
-
SRC_GEN_DIR
- See Also:
-
CLASS
public static final int CLASS- See Also:
-
BASEMETHOD
public static final int BASEMETHOD- See Also:
-
MODULEMETHOD
public static final int MODULEMETHOD- See Also:
-
RUNTIME
public static final int RUNTIME- See Also:
-
SINGLETONCLASS
public static final int SINGLETONCLASS- See Also:
-
RUBYMODULE
public static final int RUBYMODULE- See Also:
-
-
Constructor Details
-
IndyBinder
public IndyBinder()
-
-
Method Details
-
process
- Specified by:
process
in interfaceProcessor
- Specified by:
process
in classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
processType
-
emitIndexCode
-
processMethodDeclarations
-
processMethodDeclaration
-
getEncodedSignature
-
processMethodDeclarationMulti
-
adaptHandle
-
encodeSignature
public static long encodeSignature(int pre, int opt, int post, int kwargs, int requiredKwargs, boolean rest, boolean restKwargs) -
generateMethodAddCalls
-