Top Description Fields Constructors Methods
org.aspectj.weaver.bcel

public Class FakeAnnotation

extends AnnotationGen
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, java.util.List, org.aspectj.apache.bcel.classfile.annotation.AnnotationGen, .NameValuePair

For implementing declare @type interacting with declare @parents during compilation - we need to be able to add an annotation to 'binary type binding' (this is how types are seen during incremental compilation). Unlike a SourceTypeBinding - a BinaryTypeBinding does not allow easy interaction with its annotations - so what we do is take the eclipse annotation, suck out the name/signature and visibility and put that information in a 'FakeAnnotation'. The FakeAnnotation is attached to the BCEL delegate for the binary type binding - this will allow type resolution to succeed correctly. The FakeAnnotation never makes it to disk, since the weaver does the job properly, attaching a real annotation.

Field Summary

Modifier and TypeField and Description
private boolean
private String
private String
Inherited from org.aspectj.apache.bcel.classfile.annotation.AnnotationGen:
NO_ANNOTATIONS

Constructor Summary

AccessConstructor and Description
public
FakeAnnotation(String name, String sig, boolean isRuntimeVisible)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public int
public String
public String
public List<E>
public boolean
protected void
public String
public String
toString()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.toString.

Returns a string representation of the object.
Inherited from org.aspectj.apache.bcel.classfile.annotation.AnnotationGen:
hasNamedValuehasNameValuePairread

Field Detail

isRuntimeVisibleback to summary
private boolean isRuntimeVisible

Hides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.isRuntimeVisible.

nameback to summary
private String name
sigback to summary
private String sig

Constructor Detail

FakeAnnotationback to summary
public FakeAnnotation(String name, String sig, boolean isRuntimeVisible)

Method Detail

addElementNameValuePairback to summary
public void addElementNameValuePair(NameValuePair evp)

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.addElementNameValuePair.

dumpback to summary
public void dump(DataOutputStream dos) throws IOException

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.dump.

getTypeIndexback to summary
public int getTypeIndex()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.getTypeIndex.

getTypeNameback to summary
public String getTypeName()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.getTypeName.

getTypeSignatureback to summary
public String getTypeSignature()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.getTypeSignature.

getValuesback to summary
public List<E> getValues()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.getValues.

isRuntimeVisibleback to summary
public boolean isRuntimeVisible()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.isRuntimeVisible.

setIsRuntimeVisibleback to summary
protected void setIsRuntimeVisible(boolean b)
toShortStringback to summary
public String toShortString()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.toShortString.

toStringback to summary
public String toString()

Overrides org.aspectj.apache.bcel.classfile.annotation.AnnotationGen.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.