|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atjava.lang.annotation.AnnotatedBlock
public class AnnotatedBlock
This class represents a part of code annotated by a Block Annotation.
In this example:
@MyBlockAnnotation("Declaration"){int a=1;}
the associated AnnotatedBlock will allow you to retrieve:
int a=1;
)
@MyBlockAnnotation("Declaration")
@MyBlockAnnotation("Declaration"){int a=1;}
)
Method Summary | ||
---|---|---|
boolean |
areBlockAnnotationsPresent()
Returns true if there are AnnotatedBlocks nested in the AnnotatedBlock |
|
boolean |
areBlockAnnotationsPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are AnnotatedBlocks nested in the AnnotatedBlock having the specified type. |
|
boolean |
areBlockAnnotationsPresentAtSomeLevel(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are AnnotatedBlocks nested in the AnnotatedBlock having the specified type. |
|
boolean |
areExpressionAnnotationsPresent()
Returns true if there are AnnotatedExpressions nested in the AnnotatedBlock |
|
boolean |
areExpressionAnnotationsPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are AnnotatedExpressions nested in the AnnotatedBlock having the specified type. |
|
boolean |
areExpressionAnnotationsPresentAtSomeLevel(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if there are ExpressionAnnotations nested in the AnnotatedBlock 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 |
|
AnnotatedBlock[] |
getAnnotatedBlocks()
Returns all the AnnotatedBlocks that appears in the AnnotatedBlock (if any). |
|
AnnotatedBlock[] |
getAnnotatedBlocks(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns all the AnnotatedBlocks that appears in the AnnotatedBlock (if any) having the specified type. |
|
AnnotatedExpression[] |
getAnnotatedExpressions()
Returns all the AnnotatedExpressions that appears in the AnnotatedBlock (if any) |
|
AnnotatedExpression[] |
getAnnotatedExpressions(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns all the AnnotatedExpressions that appears in the AnnotatedBlock (if any) having the specified type. |
|
java.lang.annotation.Annotation |
getAnnotation()
Returns the annotation associated with the AnnotatedBlock |
|
java.lang.String |
getAnnotationType()
Returns the type of the annotation of this AnnotatedBlock |
|
java.lang.annotation.Annotation[] |
getBlockAnnotations()
Returns all the Annotations applied to the AnnotatedBlocks that appears in the AnnotatedBlock (if any). |
|
|
getBlockAnnotations(java.lang.Class<T> annotationClass)
Returns all the Annotations applied to the AnnotatedBlocks that appears in the AnnotatedBlock (if any) having the specified type Only the AnnotatedBlocks at level 0 (that is, not the nested ones) are taken in consideration. |
|
java.lang.String |
getBodySourceCode()
Returns the source code associated with the AnnotatedBlock |
|
byte[] |
getBytecode()
Returns the bytecode associated with the AnnotatedBlock |
|
java.lang.annotation.Annotation[] |
getExpressionAnnotations()
Returns all the Annotations applied to the AnnotatedExpressions that appears in the AnnotatedBlock (if any). |
|
|
getExpressionAnnotations(java.lang.Class<T> annotationClass)
Returns all the Annotations applied to the AnnotatedExpressions that appears in the AnnotatedBlock (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 AnnotatedBlock |
|
java.lang.String |
getSourceCode()
Returns the source code associated with the AnnotatedBlock |
|
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 AnnotatedBlock to a String containing the binary representation of the bytecode annotated |
|
java.lang.String |
toHexBytecodeString()
Converts the AnnotatedBlock to a String containing the hexadecimal representation of the bytecode annotated |
|
java.lang.String |
toIntBytecodeString()
Converts the AnnotatedBlock to a String containing the decimal representation of the bytecode annotated |
|
java.lang.String |
toString()
Converts the AnnotatedBlock to a String |
|
java.lang.String |
toStringWithInnerAnnotatedBlockAndExpression()
Converts the AnnotatedBlock to a String including the list of the Block and Expression Annotation that it contains (if any) |
|
java.lang.String |
toSymBytecodeString()
Converts the AnnotatedBlock 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[] getBlockAnnotations()
public <T extends java.lang.annotation.Annotation> T[] getBlockAnnotations(java.lang.Class<T> annotationClass)
public boolean areBlockAnnotationsPresent()
public boolean areBlockAnnotationsPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotationpublic boolean areBlockAnnotationsPresentAtSomeLevel(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotationpublic 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 AnnotatedBlock[] getAnnotatedBlocks()
public AnnotatedBlock[] getAnnotatedBlocks(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- the desired type of Annotation
public 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
public int getLevel()
public java.lang.String getAnnotationType()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringWithInnerAnnotatedBlockAndExpression()
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 |