|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atjava.lang.annotation.AnnotatedExpression
public class AnnotatedExpression
This class represents a part of code annotated by an Expression Annotation.
In this example:
@MyExpressionAnnotation("Assignement"){a=1}
the associated ExpressionAnnotation will allow you to retrieve:
a=1;
)
@MyExpressionAnnotation("Assignement")
@MyBlockAnnotation("Assignement"){int a=1;}
)
Method Summary | ||
---|---|---|
boolean |
areExpressionAnnotationsPresent()
Returns true if there are AnnotatedExpressions nested in the AnnotatedExpressions |
|
boolean |
areExpressionAnnotationsPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are AnnotatedExpressions nested in the AnnotatedExpression having the specified type. |
|
boolean |
areExpressionAnnotationsPresentAtSomeLevel(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are ExpressionAnnotations nested in the ExpressionAnnotation having the specified type. |
|
int |
endSourceColumn()
The column number in the source code where the annotation ends |
|
int |
endSourceLine()
The line number in the source code where the annotation ends |
|
AnnotatedExpression[] |
getAnnotatedExpressions()
Returns all the AnnotatedExpressions that appears in the AnnotatedExpression (if any) |
|
AnnotatedExpression[] |
getAnnotatedExpressions(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns all the AnnotatedExpressions that appears in the AnnotatedExpression (if any) having the specified type. |
|
java.lang.annotation.Annotation |
getAnnotation()
Returns the annotation associated with the AnnotatedExpression |
|
java.lang.String |
getAnnotationType()
Returns the type of the annotation of this AnnotatedExpression |
|
java.lang.String |
getBodySourceCode()
Returns the source code associated with the AnnotatedExpression |
|
byte[] |
getBytecode()
Returns the bytecode associated with the AnnotatedExpression |
|
java.lang.annotation.Annotation[] |
getExpressionAnnotations()
Returns all the Annotations applied to the AnnotatedExpressions that appears in the AnnotatedExpression (if any). |
|
|
getExpressionAnnotations(java.lang.Class<T> annotationClass)
Returns all the Annotations applied to the AnnotatedExpressions that appears in the AnnotatedExpression (if any) having the specified type Only the AnnotatedExpressions at level 0 (that is, not the nested ones) are taken in consideration. |
|
int |
getLevel()
Returns the level of this AnnotatedExpression |
|
java.lang.String |
getSourceCode()
Returns the source code associated with the AnnotatedExpression |
|
int |
startSourceColumn()
The column number in the source code where the annotation begins |
|
int |
startSourceLine()
The line number in the source code where the annotation begins |
|
java.lang.String |
toBinBytecodeString()
Converts the AnnotatedExpression to a String containing the binary representation of the bytecode annotated |
|
java.lang.String |
toHexBytecodeString()
Converts the AnnotatedExpression to a String containing the hexadecimal representation of the bytecode annotated |
|
java.lang.String |
toIntBytecodeString()
Converts the AnnotatedExpression to a String containing the decimal representation of the bytecode annotated |
|
java.lang.String |
toString()
Converts the AnnotatedExpression to a String |
|
java.lang.String |
toStringWithInnerAnnotatedExpression()
Converts the AnnotatedBlock to a String including the list of the Expression Annotation that it contains (if any) |
|
java.lang.String |
toSymBytecodeString()
Converts the AnnotatedExpression to a String containing the symbolic representation of the bytecode annotated |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int startSourceLine()
public int startSourceColumn()
public int endSourceLine()
public int endSourceColumn()
public java.lang.annotation.Annotation[] getExpressionAnnotations()
public <T extends java.lang.annotation.Annotation> T[] getExpressionAnnotations(java.lang.Class<T> annotationClass)
public boolean areExpressionAnnotationsPresent()
public boolean areExpressionAnnotationsPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotationpublic boolean areExpressionAnnotationsPresentAtSomeLevel(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotationpublic AnnotatedExpression[] getAnnotatedExpressions()
public AnnotatedExpression[] getAnnotatedExpressions(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotation
public byte[] getBytecode()
public java.lang.annotation.Annotation getAnnotation()
public java.lang.String getSourceCode() throws SourceNotAvailableException, InvalidReferenceException
public java.lang.String getBodySourceCode() throws SourceNotAvailableException, InvalidReferenceException
SourceNotAvailableException
InvalidReferenceException
public int getLevel()
public java.lang.String getAnnotationType()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringWithInnerAnnotatedExpression()
public java.lang.String toBinBytecodeString()
public java.lang.String toIntBytecodeString()
public java.lang.String toHexBytecodeString()
public java.lang.String toSymBytecodeString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |