Package org.codehaus.janino.util
Class ClassFile.MethodInfo
- java.lang.Object
-
- org.codehaus.janino.util.ClassFile.MethodInfo
-
-
Constructor Summary
Constructors Constructor Description MethodInfo(Java.Modifiers modifiers, short nameIndex, short descriptorIndex, List<ClassFile.AttributeInfo> attributes)
Initializes the "method_info" structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(ClassFile.AttributeInfo attribute)
Adds the givenattribute
to this method.Java.Annotation[]
getAnnotations()
ClassFile.AttributeInfo[]
getAttributes()
ClassFile
getClassFile()
String
getDescriptor()
short
getModifierFlags()
String
getName()
void
store(DataOutputStream dos)
Writes this object to aDataOutputStream
, in the format described inJVMS7 4.6.
-
-
-
Constructor Detail
-
MethodInfo
public MethodInfo(Java.Modifiers modifiers, short nameIndex, short descriptorIndex, List<ClassFile.AttributeInfo> attributes)
Initializes the "method_info" structure.
-
-
Method Detail
-
getClassFile
public ClassFile getClassFile()
- Returns:
- The
ClassFile
that contains thisClassFile.MethodInfo
object
-
getModifierFlags
public short getModifierFlags()
- Returns:
- The modifier flags of this method; or'ed values are the constants declared in
Mod
.
-
getAnnotations
public Java.Annotation[] getAnnotations()
- Returns:
- The annotations of this method
-
getName
public String getName()
- Returns:
- The method's name
-
getDescriptor
public String getDescriptor()
- Returns:
- The method descriptor describing this method
-
getAttributes
public ClassFile.AttributeInfo[] getAttributes()
- Returns:
- The attributes of this method
-
addAttribute
public void addAttribute(ClassFile.AttributeInfo attribute)
Adds the givenattribute
to this method.
-
store
public void store(DataOutputStream dos) throws IOException
Writes this object to aDataOutputStream
, in the format described inJVMS7 4.6.- Throws:
IOException
-
-