org.aspectj.apache.bcel.classfile
Class FieldOrMethod

java.lang.Object
  extended by org.aspectj.apache.bcel.classfile.Modifiers
      extended by org.aspectj.apache.bcel.classfile.FieldOrMethod
All Implemented Interfaces:
Node
Direct Known Subclasses:
Field, Method

public abstract class FieldOrMethod
extends Modifiers
implements Node

Abstract super class for fields and methods.


Field Summary
protected  Attribute[] attributes
           
protected  ConstantPool cpool
           
protected  int nameIndex
           
protected  int signatureIndex
           
 
Fields inherited from class org.aspectj.apache.bcel.classfile.Modifiers
modifiers
 
Constructor Summary
protected FieldOrMethod()
           
protected FieldOrMethod(java.io.DataInputStream file, ConstantPool cpool)
           
protected FieldOrMethod(FieldOrMethod c)
          Initialize from another object.
protected FieldOrMethod(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool cpool)
           
 
Method Summary
 void dump(java.io.DataOutputStream file)
           
 AnnotationGen[] getAnnotations()
           
 Attribute[] getAttributes()
           
 ConstantPool getConstantPool()
           
 java.lang.String getDeclaredSignature()
          This will return the contents of a signature attribute attached to a member, or if there is none it will return the same as 'getSignature()'.
 java.lang.String getGenericSignature()
          Hunts for a signature attribute on the member and returns its contents.
 java.lang.String getName()
           
 int getNameIndex()
           
 java.lang.String getSignature()
           
 int getSignatureIndex()
           
 void setAttributes(Attribute[] attributes)
           
 
Methods inherited from class org.aspectj.apache.bcel.classfile.Modifiers
getModifiers, isAbstract, isBridge, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVarargs, isVolatile, setModifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.aspectj.apache.bcel.classfile.Node
accept
 

Field Detail

nameIndex

protected int nameIndex

signatureIndex

protected int signatureIndex

attributes

protected Attribute[] attributes

cpool

protected ConstantPool cpool
Constructor Detail

FieldOrMethod

protected FieldOrMethod()

FieldOrMethod

protected FieldOrMethod(FieldOrMethod c)
Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy.


FieldOrMethod

protected FieldOrMethod(java.io.DataInputStream file,
                        ConstantPool cpool)
                 throws java.io.IOException
Throws:
java.io.IOException

FieldOrMethod

protected FieldOrMethod(int accessFlags,
                        int nameIndex,
                        int signatureIndex,
                        Attribute[] attributes,
                        ConstantPool cpool)
Method Detail

setAttributes

public void setAttributes(Attribute[] attributes)
Parameters:
attributes - Collection of object attributes.

dump

public final void dump(java.io.DataOutputStream file)
                throws java.io.IOException
Throws:
java.io.IOException

getAttributes

public final Attribute[] getAttributes()

getConstantPool

public final ConstantPool getConstantPool()

getNameIndex

public final int getNameIndex()

getSignatureIndex

public final int getSignatureIndex()

getName

public final java.lang.String getName()

getSignature

public final java.lang.String getSignature()

getDeclaredSignature

public final java.lang.String getDeclaredSignature()
This will return the contents of a signature attribute attached to a member, or if there is none it will return the same as 'getSignature()'. Signature attributes are attached to members that were declared generic.


getAnnotations

public AnnotationGen[] getAnnotations()

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;' Coded for performance - searches for the attribute only when requested - only searches for it once.