Top Description Fields Constructors Methods
org.aspectj.apache.bcel.classfile

public abstract Class FieldOrMethod

extends Modifiers
implements Node
Class Inheritance
All Implemented Interfaces
org.aspectj.apache.bcel.classfile.Node
Known Direct Subclasses
org.aspectj.apache.bcel.classfile.Method, org.aspectj.apache.bcel.classfile.Field
Imports
java.io.DataInputStream, .DataOutputStream, .IOException, java.util.ArrayList, .List, org.aspectj.apache.bcel.Constants, org.aspectj.apache.bcel.classfile.annotation.AnnotationGen, .RuntimeAnnos

Abstract super class for fields and methods.
Author
M. Dahm
Version
$Id: FieldOrMethod.java,v 1.12 2009/09/15 19:40:12 aclement Exp $

Field Summary

Modifier and TypeField and Description
private AnnotationGen[]
protected Attribute[]
protected ConstantPool
private String
protected int
private boolean
private String
private String
protected int
Inherited from org.aspectj.apache.bcel.classfile.Modifiers:
modifiers

Constructor Summary

AccessConstructor and Description
protected
protected
FieldOrMethod(FieldOrMethod c)

Initialize from another object.

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

Method Summary

Modifier and TypeMethod and Description
public final void
public AnnotationGen[]
public final Attribute[]
public final ConstantPool
public final 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()'.

public final String
getGenericSignature()

Hunts for a signature attribute on the member and returns its contents.

public final String
public final int
public final String
public final int
public void
setAttributes(Attribute[]
Collection of object attributes.
attributes
)

Inherited from org.aspectj.apache.bcel.classfile.Modifiers:
getModifiersisAbstractisBridgeisFinalisInterfaceisNativeisPrivateisProtectedisPublicisStaticisStrictfpisSynchronizedisTransientisVarargsisVolatilesetModifiers

Field Detail

annotationsback to summary
private AnnotationGen[] annotations
attributesback to summary
protected Attribute[] attributes
cpoolback to summary
protected ConstantPool cpool
nameback to summary
private String name
nameIndexback to summary
protected int nameIndex
searchedForSignatureAttributeback to summary
private boolean searchedForSignatureAttribute
signatureback to summary
private String signature
signatureAttributeStringback to summary
private String signatureAttributeString
signatureIndexback to summary
protected int signatureIndex

Constructor Detail

FieldOrMethodback to summary
protected FieldOrMethod()
FieldOrMethodback to summary
protected FieldOrMethod(FieldOrMethod c)

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

FieldOrMethodback to summary
protected FieldOrMethod(DataInputStream file, ConstantPool cpool) throws IOException
FieldOrMethodback to summary
protected FieldOrMethod(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool cpool)

Method Detail

dumpback to summary
public final void dump(DataOutputStream file) throws IOException
getAnnotationsback to summary
public AnnotationGen[] getAnnotations()
getAttributesback to summary
public final Attribute[] getAttributes()
getConstantPoolback to summary
public final ConstantPool getConstantPool()
getDeclaredSignatureback to summary
public final 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.

getGenericSignatureback to summary
public final 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.

getNameback to summary
public final String getName()
getNameIndexback to summary
public final int getNameIndex()
getSignatureback to summary
public final String getSignature()
getSignatureIndexback to summary
public final int getSignatureIndex()
setAttributesback to summary
public void setAttributes(Attribute[] attributes)
Parameters
attributes:Attribute[]

Collection of object attributes.