Class MethodDescriptor<T>

java.lang.Object
org.jruby.anno.MethodDescriptor<T>
Direct Known Subclasses:
ExecutableElementDescriptor, JavaMethodDescriptor

public abstract class MethodDescriptor<T> extends Object
  • Field Details

    • IRUBYOBJECT_ARRAY_CLASS_NAME

      public static final String 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

      public final JRubyMethod anno
    • modifiers

      public final int modifiers
    • declaringClassName

      public final String declaringClassName
    • declaringClassPath

      public final String declaringClassPath
    • name

      public final String name
    • rubyName

      public final String rubyName
    • MAX_REQUIRED_UNBOXED_ARITY

      public static final int MAX_REQUIRED_UNBOXED_ARITY
      See Also:
  • Constructor Details

    • MethodDescriptor

      public MethodDescriptor(T methodObject)
  • Method Details

    • getAnnotation

      protected abstract <A extends Annotation> A getAnnotation(T methodObject, Class<A> annotationType)
    • getModifiers

      protected abstract int getModifiers(T methodObject)
    • getDeclaringClassName

      protected abstract String getDeclaringClassName(T methodObject)
    • getSimpleName

      protected abstract String getSimpleName(T methodObject)
    • hasContext

      protected abstract boolean hasContext(T methodObject)
    • hasBlock

      protected abstract boolean hasBlock(T methodObject)
    • parameterCount

      protected abstract int parameterCount(T methodObject)
    • parameterAsString

      protected abstract String parameterAsString(T methodObject, int index)
    • 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.