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 voidaddAttribute(ClassFile.AttributeInfo attribute)Adds the givenattributeto this method.Java.Annotation[]getAnnotations()ClassFile.AttributeInfo[]getAttributes()ClassFilegetClassFile()StringgetDescriptor()shortgetModifierFlags()StringgetName()voidstore(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
ClassFilethat contains thisClassFile.MethodInfoobject
-
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 givenattributeto this method.
-
store
public void store(DataOutputStream dos) throws IOException
Writes this object to aDataOutputStream, in the format described inJVMS7 4.6.- Throws:
IOException
-
-