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 AnnotationGen
NO_ANNOTATIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddump(DataOutputStream dos) intbooleanprotected voidsetIsRuntimeVisible(boolean b) toString()Methods inherited from class AnnotationGen
hasNamedValue, hasNameValuePair, readModifier and TypeMethodDescriptionbooleanhasNamedValue(String name) booleanhasNameValuePair(String name, String value) static AnnotationGenread(DataInputStream dis, ConstantPool cpool, boolean b)
-
Constructor Details
-
FakeAnnotation
-
-
Method Details
-
getTypeName
- Overrides:
getTypeNamein classAnnotationGen
-
getTypeSignature
- Overrides:
getTypeSignaturein classAnnotationGen
-
addElementNameValuePair
- Overrides:
addElementNameValuePairin classAnnotationGen
-
dump
- Overrides:
dumpin classAnnotationGen- Throws:
IOException
-
getTypeIndex
public int getTypeIndex()- Overrides:
getTypeIndexin classAnnotationGen
-
getValues
- Overrides:
getValuesin classAnnotationGen
-
isRuntimeVisible
public boolean isRuntimeVisible()- Overrides:
isRuntimeVisiblein classAnnotationGen
-
setIsRuntimeVisible
protected void setIsRuntimeVisible(boolean b) -
toShortString
- Overrides:
toShortStringin classAnnotationGen
-
toString
- Overrides:
toStringin classAnnotationGen
-