Package org.jruby.anno
Class MethodDescriptor<T>
java.lang.Object
org.jruby.anno.MethodDescriptor<T>
- Direct Known Subclasses:
ExecutableElementDescriptor
,JavaMethodDescriptor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns a value useful for number of arguments we need for arity when generating call methods used by invokers and the JIT.protected abstract <A extends Annotation>
AgetAnnotation
(T methodObject, Class<A> annotationType) protected abstract String
getDeclaringClassName
(T methodObject) protected abstract int
getModifiers
(T methodObject) protected abstract String
getSimpleName
(T methodObject) protected abstract boolean
protected abstract boolean
hasContext
(T methodObject) protected abstract String
parameterAsString
(T methodObject, int index) protected abstract int
parameterCount
(T methodObject)
-
Field Details
-
IRUBYOBJECT_ARRAY_CLASS_NAME
- See Also:
-
isStatic
public final boolean isStatic -
hasContext
public final boolean hasContext -
hasBlock
public final boolean hasBlock -
hasVarArgs
public final boolean hasVarArgs -
actualRequired
public final int actualRequired -
arity
public final int arity -
required
public final int required -
optional
public final int optional -
rest
public final boolean rest -
anno
-
modifiers
public final int modifiers -
declaringClassName
-
declaringClassPath
-
name
-
rubyName
-
MAX_REQUIRED_UNBOXED_ARITY
public static final int MAX_REQUIRED_UNBOXED_ARITY- See Also:
-
-
Constructor Details
-
MethodDescriptor
-
-
Method Details
-
getAnnotation
-
getModifiers
-
getDeclaringClassName
-
getSimpleName
-
hasContext
-
hasBlock
-
parameterCount
-
parameterAsString
-
calculateSpecificCallArity
public int calculateSpecificCallArity()Returns a value useful for number of arguments we need for arity when generating call methods used by invokers and the JIT. Note: MAX_REQUIRED_UNBOXED_ARITY looks like some tweakable setting but it is merely for documentation. All our non-generated internal code is also locked to the same specific arities so we cannot just change this value and be happy.- Returns:
- arity value of specific required arity which can be used as an unboxed call or -1 for all other cases.
-