Package org.aspectj.weaver.bcel
Class FakeAnnotation
java.lang.Object
org.aspectj.apache.bcel.classfile.annotation.AnnotationGen
org.aspectj.weaver.bcel.FakeAnnotation
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
Fields inherited from class org.aspectj.apache.bcel.classfile.annotation.AnnotationGen
NO_ANNOTATIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
dump(DataOutputStream dos)
int
boolean
protected void
setIsRuntimeVisible(boolean b)
toString()
Methods inherited from class org.aspectj.apache.bcel.classfile.annotation.AnnotationGen
hasNamedValue, hasNameValuePair, read
-
Constructor Details
-
FakeAnnotation
-
-
Method Details
-
getTypeName
- Overrides:
getTypeName
in classAnnotationGen
-
getTypeSignature
- Overrides:
getTypeSignature
in classAnnotationGen
-
addElementNameValuePair
- Overrides:
addElementNameValuePair
in classAnnotationGen
-
dump
- Overrides:
dump
in classAnnotationGen
- Throws:
IOException
-
getTypeIndex
public int getTypeIndex()- Overrides:
getTypeIndex
in classAnnotationGen
-
getValues
- Overrides:
getValues
in classAnnotationGen
-
isRuntimeVisible
public boolean isRuntimeVisible()- Overrides:
isRuntimeVisible
in classAnnotationGen
-
setIsRuntimeVisible
protected void setIsRuntimeVisible(boolean b) -
toShortString
- Overrides:
toShortString
in classAnnotationGen
-
toString
- Overrides:
toString
in classAnnotationGen
-