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 int
accessFlags
private java.util.List<Attribute>
attributes
private ClassFile
classFile
private CodeAttribute
codeAttribute
private boolean
constructor
private java.lang.String
descriptor
private short
descriptorIndex
the index of the descriptor into the const poolprivate ExceptionsAttribute
exceptionsAttribute
private java.lang.String
name
private short
nameIndex
The index of the name into the const poolprivate java.lang.String[]
parameters
private java.lang.String
returnType
private AnnotationsAttribute
runtimeVisibleAnnotationsAttribute
private ParameterAnnotationsAttribute
runtimeVisibleParameterAnnotationsAttribute
private java.lang.String
signature
private SignatureAttribute
signatureAttribute
-
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 void
addCheckedExceptions(java.lang.Class<? extends java.lang.Exception>... exceptions)
void
addCheckedExceptions(java.lang.String... exceptions)
boolean
equals(java.lang.Object obj)
int
getAccessFlags()
ClassFile
getClassFile()
CodeAttribute
getCodeAttribute()
java.lang.String
getDescriptor()
java.lang.String
getName()
java.lang.String[]
getParameters()
java.lang.String
getReturnType()
AnnotationsAttribute
getRuntimeVisibleAnnotationsAttribute()
ParameterAnnotationsAttribute
getRuntimeVisibleParameterAnnotationsAttribute()
java.lang.String
getSignature()
int
hashCode()
boolean
isConstructor()
boolean
isStatic()
void
setSignature(java.lang.String signature)
java.lang.String
toString()
void
write(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 short nameIndex
The index of the name into the const pool
-
descriptorIndex
private final short 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:
write
in 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-