org.apache.bcel.classfile
Class FieldOrMethod
- java.lang.Object
-
- org.apache.bcel.classfile.AccessFlags
-
- org.apache.bcel.classfile.FieldOrMethod
-
- All Implemented Interfaces:
- java.lang.Cloneable, Node
public abstract class FieldOrMethod extends AccessFlags implements java.lang.Cloneable, Node
Abstract super class for fields and methods.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddump(java.io.DataOutputStream file)Dump object to file stream on binary format.AnnotationEntry[]getAnnotationEntries()Attribute[]getAttributes()ConstantPoolgetConstantPool()java.lang.StringgetGenericSignature()Hunts for a signature attribute on the member and returns its contents.java.lang.StringgetName()intgetNameIndex()java.lang.StringgetSignature()intgetSignatureIndex()voidsetAttributes(Attribute[] attributes)voidsetConstantPool(ConstantPool constant_pool)voidsetNameIndex(int name_index)voidsetSignatureIndex(int signature_index)-
Methods inherited from class org.apache.bcel.classfile.AccessFlags
getAccessFlags, getModifiers, isAbstract, isAbstract, isAnnotation, isAnnotation, isEnum, isEnum, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isSynthetic, isSynthetic, isTransient, isTransient, isVarArgs, isVarArgs, isVolatile, isVolatile, setAccessFlags, setModifiers
-
-
-
-
Method Detail
-
dump
public final void dump(java.io.DataOutputStream file) throws java.io.IOExceptionDump object to file stream on binary format.- Parameters:
file- Output file stream- Throws:
java.io.IOException
-
getAttributes
public final Attribute[] getAttributes()
- Returns:
- Collection of object attributes.
-
setAttributes
public final void setAttributes(Attribute[] attributes)
- Parameters:
attributes- Collection of object attributes.
-
getConstantPool
public final ConstantPool getConstantPool()
- Returns:
- Constant pool used by this object.
-
setConstantPool
public final void setConstantPool(ConstantPool constant_pool)
- Parameters:
constant_pool- Constant pool to be used for this object.
-
getNameIndex
public final int getNameIndex()
- Returns:
- Index in constant pool of object's name.
-
setNameIndex
public final void setNameIndex(int name_index)
- Parameters:
name_index- Index in constant pool of object's name.
-
getSignatureIndex
public final int getSignatureIndex()
- Returns:
- Index in constant pool of field signature.
-
setSignatureIndex
public final void setSignatureIndex(int signature_index)
- Parameters:
signature_index- Index in constant pool of field signature.
-
getName
public final java.lang.String getName()
- Returns:
- Name of object, i.e., method name or field name
-
getSignature
public final java.lang.String getSignature()
- Returns:
- String representation of object's type signature (java style)
-
getAnnotationEntries
public AnnotationEntry[] getAnnotationEntries()
- Returns:
- Annotations on the field or method
- Since:
- 6.0
-
getGenericSignature
public final java.lang.String getGenericSignature()
Hunts for a signature attribute on the member and returns its contents. So where the 'regular' signature may be (Ljava/util/Vector;)V the signature attribute may in fact say 'Ljava/lang/Vector<Ljava/lang/String>;' Coded for performance - searches for the attribute only when requested - only searches for it once.- Since:
- 6.0
-
-
DataMelt 3.0 © DataMelt by jWork.ORG