APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.classfile

public Class AnnotationDefault

extends Attribute
Class Inheritance
Imports
java.io.DataInput, .DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.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
public final void
dump(final DataOutputStream dos)

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.

public final ElementValue
getDefaultValue()

Returns: the default value

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

Inherited from com.sun.org.apache.bcel.internal.classfile.Attribute:
addAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndextoString

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 com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.Attribute.copy.

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

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Doc from com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.

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