annotations.h File Reference


Detailed Description

Declaration of main resolution routines for Java annotations.


Functions

jobjectArray get_annotations (JNIEnv *jenv, AnnotationTable *table, AnnotationTable *inv_table, Class *clss)
 Returns common array of visible and invisible annotations.
jobject resolve_annotation (JNIEnv *jenv, Annotation *antn, Class *clss, jthrowable *cause=NULL)
 Returns resolved annotation or null if resolution failed.
jobject resolve_annotation_value (JNIEnv *jenv, Class *clss, AnnotationValue &antn, Class *antn_clss, String *name, jthrowable *cause)
 Returns resolved annotation value or null if resolution failed.


Function Documentation

jobjectArray get_annotations ( JNIEnv jenv,
AnnotationTable table,
AnnotationTable inv_table,
Class clss 
)

Returns common array of visible and invisible annotations.

Note:
invisible annotations are present only if -Xinvisible command line flag is set An annotation which cannot be resolved (i.e. it's type cannot be loaded) is silently ignored, per JSR-175. Returns zero-sized array if there are no (resolved) annotations. May raise an exception, in this case returns null.
Parameters:
jenv - JNI interface
table - annotations to resolve
inv_table - invisible annotations to resolve
clss - an "owner" class, which is annotated or whose member is annotated
Returns:
- array of resolved annotations or null

jobject resolve_annotation ( JNIEnv jenv,
Annotation antn,
Class clss,
jthrowable cause = NULL 
)

Returns resolved annotation or null if resolution failed.

If the cause parameter is not null, resolution error is assigned to it for upstream processing; otherwise the error is raised. In case of errors other than resolving failure, the error is raised, null is returned and cause is unchanged

Parameters:
jenv - JNI interface
antn - the annotation to be resolved
clss - an "owner" class, which is annotated or whose member is annotated
cause - out-parameter to return resolution failure (if any)
Returns:
- resolved annotation or null if resolution failed

jobject resolve_annotation_value ( JNIEnv jenv,
Class clss,
AnnotationValue antn,
Class antn_clss,
String name,
jthrowable cause 
)

Returns resolved annotation value or null if resolution failed.

In case of a resolution failure, the error is assigned to the "cause" parameter for upstream processing. In case of errors other than resolving failure, the error is raised, null is returned and cause is unchanged

Parameters:
jenv - JNI interface pointer
clss - an "owner" class, which is annotated or whose member is annotated
antn - the value to be resolved
antn_clss - annotation type
name - the name of an annotation member which holds the value
cause - out-parameter to return resolution failure (if any)
Returns:
- resolved annotation value or null if resolution failed


Genereated on Tue Mar 11 19:25:56 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.