Package org.jboss.classfilewriter
Class ClassMethod
- java.lang.Object
-
- org.jboss.classfilewriter.ClassMethod
-
- All Implemented Interfaces:
WritableEntry
public class ClassMethod extends java.lang.Object implements WritableEntry
-
-
Field Summary
Fields Modifier and Type Field Description private intaccessFlagsprivate java.util.List<Attribute>attributesprivate ClassFileclassFileprivate CodeAttributecodeAttributeprivate booleanconstructorprivate java.lang.Stringdescriptorprivate intdescriptorIndexthe index of the descriptor into the const poolprivate ExceptionsAttributeexceptionsAttributeprivate java.lang.Stringnameprivate intnameIndexThe index of the name into the const poolprivate java.lang.String[]parametersprivate java.lang.StringreturnTypeprivate AnnotationsAttributeruntimeVisibleAnnotationsAttributeprivate ParameterAnnotationsAttributeruntimeVisibleParameterAnnotationsAttributeprivate java.lang.Stringsignatureprivate SignatureAttributesignatureAttribute
-
Constructor Summary
Constructors Constructor Description ClassMethod(java.lang.String name, java.lang.String returnType, java.lang.String[] parameters, int accessFlags, ClassFile classFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCheckedExceptions(java.lang.Class<? extends java.lang.Exception>... exceptions)voidaddCheckedExceptions(java.lang.String... exceptions)booleanequals(java.lang.Object obj)intgetAccessFlags()ClassFilegetClassFile()CodeAttributegetCodeAttribute()java.lang.StringgetDescriptor()java.lang.StringgetName()java.lang.String[]getParameters()java.lang.StringgetReturnType()AnnotationsAttributegetRuntimeVisibleAnnotationsAttribute()ParameterAnnotationsAttributegetRuntimeVisibleParameterAnnotationsAttribute()java.lang.StringgetSignature()inthashCode()booleanisConstructor()booleanisStatic()voidsetSignature(java.lang.String signature)java.lang.StringtoString()voidwrite(ByteArrayDataOutputStream stream)
-
-
-
Field Detail
-
returnType
private final java.lang.String returnType
-
parameters
private final java.lang.String[] parameters
-
name
private final java.lang.String name
-
descriptor
private final java.lang.String descriptor
-
accessFlags
private final int accessFlags
-
classFile
private final ClassFile classFile
-
nameIndex
private final int nameIndex
The index of the name into the const pool
-
descriptorIndex
private final int descriptorIndex
the index of the descriptor into the const pool
-
attributes
private final java.util.List<Attribute> attributes
-
codeAttribute
private final CodeAttribute codeAttribute
-
exceptionsAttribute
private final ExceptionsAttribute exceptionsAttribute
-
constructor
private final boolean constructor
-
runtimeVisibleAnnotationsAttribute
private final AnnotationsAttribute runtimeVisibleAnnotationsAttribute
-
runtimeVisibleParameterAnnotationsAttribute
private final ParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute
-
signatureAttribute
private SignatureAttribute signatureAttribute
-
signature
private java.lang.String signature
-
-
Constructor Detail
-
ClassMethod
ClassMethod(java.lang.String name, java.lang.String returnType, java.lang.String[] parameters, int accessFlags, ClassFile classFile)
-
-
Method Detail
-
addCheckedExceptions
public void addCheckedExceptions(java.lang.Class<? extends java.lang.Exception>... exceptions)
-
addCheckedExceptions
public void addCheckedExceptions(java.lang.String... exceptions)
-
write
public void write(ByteArrayDataOutputStream stream) throws java.io.IOException
- Specified by:
writein interfaceWritableEntry- Throws:
java.io.IOException
-
getCodeAttribute
public CodeAttribute getCodeAttribute()
-
getAccessFlags
public int getAccessFlags()
-
getReturnType
public java.lang.String getReturnType()
-
getParameters
public java.lang.String[] getParameters()
-
getName
public java.lang.String getName()
-
getDescriptor
public java.lang.String getDescriptor()
-
isConstructor
public boolean isConstructor()
-
isStatic
public boolean isStatic()
-
getClassFile
public ClassFile getClassFile()
-
getRuntimeVisibleAnnotationsAttribute
public AnnotationsAttribute getRuntimeVisibleAnnotationsAttribute()
-
getRuntimeVisibleParameterAnnotationsAttribute
public ParameterAnnotationsAttribute getRuntimeVisibleParameterAnnotationsAttribute()
-
getSignature
public java.lang.String getSignature()
-
setSignature
public void setSignature(java.lang.String signature)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-