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

public Class AnnotationDefault

extends Attribute
Class Inheritance
Imports
java.io.DataInput, .DataOutputStream, .IOException, org.apache.bcel.Const

Represents the default value of a annotation for a method info.
Since
6.0

Field Summary

Modifier and TypeField and Description
private ElementValue
Inherited from org.apache.bcel.classfile.Attribute:
constant_poolEMPTY_ARRAYlengthname_indextag

Constructor Summary

AccessConstructor and Description
pack-priv
AnnotationDefault(final int
Index pointing to the name Code
nameIndex
,
final int
Content length in bytes
length
,
final DataInput
Input stream
input
,
final ConstantPool
Array of constants
constantPool
)

public
AnnotationDefault(final int
Index pointing to the name Code
nameIndex
,
final int
Content length in bytes
length
,
final ElementValue
the annotation's default value
defaultValue
,
final ConstantPool
Array of constants
constantPool
)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract org.apache.bcel.classfile.Attribute.accept.

Implements org.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
public Attribute
copy(final ConstantPool
constant pool to save.
constantPool
)

Implements abstract org.apache.bcel.classfile.Attribute.copy.

public final void
dump(final DataOutputStream
Output file stream
dos
)

Overrides org.apache.bcel.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.
public final ElementValue

Returns:

the default value
getDefaultValue
()

public final void
setDefaultValue(final ElementValue
the default value of this methodinfo's annotation
defaultValue
)

Inherited from org.apache.bcel.classfile.Attribute:
addAttributeReaderaddAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndextoString

Field Detail

defaultValueback to summary
private ElementValue defaultValue

Constructor Detail

AnnotationDefaultback to summary
pack-priv AnnotationDefault(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException
Parameters
nameIndex:int

Index pointing to the name Code

length:int

Content length in bytes

input:DataInput

Input stream

constantPool:ConstantPool

Array of constants

AnnotationDefaultback to summary
public AnnotationDefault(final int nameIndex, final int length, final ElementValue defaultValue, final ConstantPool constantPool)
Parameters
nameIndex:int

Index pointing to the name Code

length:int

Content length in bytes

defaultValue:ElementValue

the annotation's default value

constantPool:ConstantPool

Array of constants

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.classfile.Attribute.accept.

Implements org.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters
v:Visitor

Visitor object

Annotations
@Override
copyback to summary
public Attribute copy(final ConstantPool constantPool)

Implements abstract org.apache.bcel.classfile.Attribute.copy.

Parameters
constantPool:ConstantPool

Doc from org.apache.bcel.classfile.Attribute.copy.

constant pool to save.

Returns:Attribute

Doc from org.apache.bcel.classfile.Attribute.copy.

deep copy of this attribute.

Annotations
@Override
dumpback to summary
public final void dump(final DataOutputStream dos) throws IOException

Overrides org.apache.bcel.classfile.Attribute.dump.

Doc from org.apache.bcel.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.

Parameters
dos:DataOutputStream

Output file stream

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getDefaultValueback to summary
public final ElementValue getDefaultValue()
Returns:ElementValue

the default value

setDefaultValueback to summary
public final void setDefaultValue(final ElementValue defaultValue)
Parameters
defaultValue:ElementValue

the default value of this methodinfo's annotation