Top Fields Constructors Methods
org.jruby.anno

public abstract Class MethodDescriptor<T>

extends Object
Class Inheritance
Known Direct Subclasses
org.jruby.anno.ExecutableElementDescriptor, org.jruby.anno.JavaMethodDescriptor
Imports
java.lang.annotation.Annotation, java.lang.reflect.Modifier

Field Summary

Modifier and TypeField and Description
public final int
public final JRubyMethod
public final int
public final String
public final String
public final boolean
public final boolean
public final boolean
public static final String
public final boolean
public static final int
public final int
public final String
public final int
public final int
public final boolean
public final String

Constructor Summary

AccessConstructor and Description
public
MethodDescriptor(T methodObject)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

arity value of specific required arity which can be used as an unboxed call or -1 for all other cases.
calculateSpecificCallArity
()

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> A
getAnnotation(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
hasBlock(T methodObject)

protected abstract boolean
hasContext(T methodObject)

protected abstract String
parameterAsString(T methodObject, int index)

protected abstract int
parameterCount(T methodObject)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualRequiredback to summary
public final int actualRequired
annoback to summary
public final JRubyMethod anno
arityback to summary
public final int arity
declaringClassNameback to summary
public final String declaringClassName
declaringClassPathback to summary
public final String declaringClassPath
hasBlockback to summary
public final boolean hasBlock
hasContextback to summary
public final boolean hasContext
hasVarArgsback to summary
public final boolean hasVarArgs
IRUBYOBJECT_ARRAY_CLASS_NAMEback to summary
public static final String IRUBYOBJECT_ARRAY_CLASS_NAME
isStaticback to summary
public final boolean isStatic
MAX_REQUIRED_UNBOXED_ARITYback to summary
public static final int MAX_REQUIRED_UNBOXED_ARITY
modifiersback to summary
public final int modifiers
nameback to summary
public final String name
optionalback to summary
public final int optional
requiredback to summary
public final int required
restback to summary
public final boolean rest
rubyNameback to summary
public final String rubyName

Constructor Detail

MethodDescriptorback to summary
public MethodDescriptor(T methodObject)

Method Detail

calculateSpecificCallArityback to summary
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:int

arity value of specific required arity which can be used as an unboxed call or -1 for all other cases.

getAnnotationback to summary
protected abstract <A extends Annotation> A getAnnotation(T methodObject, Class<A> annotationType)
getDeclaringClassNameback to summary
protected abstract String getDeclaringClassName(T methodObject)
getModifiersback to summary
protected abstract int getModifiers(T methodObject)
getSimpleNameback to summary
protected abstract String getSimpleName(T methodObject)
hasBlockback to summary
protected abstract boolean hasBlock(T methodObject)
hasContextback to summary
protected abstract boolean hasContext(T methodObject)
parameterAsStringback to summary
protected abstract String parameterAsString(T methodObject, int index)
parameterCountback to summary
protected abstract int parameterCount(T methodObject)