Java Annotation Indexer 1.0.0.Final

org.jboss.jandex
Class MethodInfo

java.lang.Object
  extended by org.jboss.jandex.MethodInfo
All Implemented Interfaces:
AnnotationTarget

public final class MethodInfo
extends Object
implements AnnotationTarget

Represents a Java method that was annotated.

Thread-Safety

This class is immutable and can be shared between threads without safe publication.

Author:
Jason T. Greene

Method Summary
 Type[] args()
          Returns an array containing parameter types in parameter order.
static MethodInfo create(ClassInfo clazz, String name, Type[] args, Type returnType, short flags)
          Construct a new mock Method instance.
 ClassInfo declaringClass()
          Returns the class that declared this method
 short flags()
          Returns the access fields of this method.
 String name()
          Returns the name of this method
 Type returnType()
          Returns this method's return parameter type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static final MethodInfo create(ClassInfo clazz,
                                      String name,
                                      Type[] args,
                                      Type returnType,
                                      short flags)
Construct a new mock Method instance.

Parameters:
clazz - the class declaring the field
name - the name of the field
args - a read only array containing the types of each parameter in parameter order
returnType - the return value type
flags - the method attributes
Returns:
a mock field

name

public final String name()
Returns the name of this method

Returns:
the name of the method

declaringClass

public final ClassInfo declaringClass()
Returns the class that declared this method

Returns:
the declaring class

args

public final Type[] args()
Returns an array containing parameter types in parameter order.

Returns:
all parameter types

returnType

public final Type returnType()
Returns this method's return parameter type. If this method has a void return, a special void type is returned.

Returns:
the type of this method's return value

flags

public final short flags()
Returns the access fields of this method. Modifier can be used on this value.

Returns:
the access flags of this method

toString

public String toString()
Overrides:
toString in class Object

Java Annotation Indexer 1.0.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.