org.aspectj.weaver.bcel
Class FakeAnnotation
java.lang.Object
org.aspectj.apache.bcel.classfile.annotation.AnnotationGen
org.aspectj.weaver.bcel.FakeAnnotation
public class FakeAnnotation
- extends AnnotationGen
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.
Constructor Summary |
FakeAnnotation(java.lang.String name,
java.lang.String sig,
boolean isRuntimeVisible)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FakeAnnotation
public FakeAnnotation(java.lang.String name,
java.lang.String sig,
boolean isRuntimeVisible)
getTypeName
public java.lang.String getTypeName()
- Overrides:
getTypeName
in class AnnotationGen
getTypeSignature
public java.lang.String getTypeSignature()
- Overrides:
getTypeSignature
in class AnnotationGen
addElementNameValuePair
public void addElementNameValuePair(NameValuePair evp)
- Overrides:
addElementNameValuePair
in class AnnotationGen
dump
public void dump(java.io.DataOutputStream dos)
throws java.io.IOException
- Overrides:
dump
in class AnnotationGen
- Throws:
java.io.IOException
getTypeIndex
public int getTypeIndex()
- Overrides:
getTypeIndex
in class AnnotationGen
getValues
public java.util.List getValues()
- Overrides:
getValues
in class AnnotationGen
isRuntimeVisible
public boolean isRuntimeVisible()
- Overrides:
isRuntimeVisible
in class AnnotationGen
setIsRuntimeVisible
protected void setIsRuntimeVisible(boolean b)
toShortString
public java.lang.String toShortString()
- Overrides:
toShortString
in class AnnotationGen
toString
public java.lang.String toString()
- Overrides:
toString
in class AnnotationGen