org.mule.devkit.model
Interface Annotable

All Known Subinterfaces:
ConnectMethod, EnumType, Field<P>, FilterMethod, Identifiable<T>, ManagedConnectionModule, Method<P>, Module, OAuthCallbackParameterField, OAuthModule, Package, Parameter<P>, ProcessorMethod, RestCall, RestField, RestModule, RestParameter, SourceMethod, TransformerMethod, TransformerResolverMethod, Type, Variable<P>

public interface Annotable

This interface provides a way to interact this model elements that can have annotations.


Method Summary
<A extends Annotation>
A
getAnnotation(Class<A> aClass)
          Returns this element's annotation for the specified type if such an annotation is present, else null.
 List<? extends AnnotationMirror> getAnnotationMirrors()
          Returns the annotations that are directly present on this element.
 

Method Detail

getAnnotationMirrors

List<? extends AnnotationMirror> getAnnotationMirrors()
Returns the annotations that are directly present on this element.

Returns:
the annotations directly present on this element; an empty list if there are none

getAnnotation

<A extends Annotation> A getAnnotation(Class<A> aClass)
Returns this element's annotation for the specified type if such an annotation is present, else null. The annotation may be either inherited or directly present on this element.

The annotation returned by this method could contain an element whose value is of type Class. This value cannot be returned directly: information necessary to locate and load a class (such as the class loader to use) is not available, and the class might not be loadable at all. Attempting to read a Class object by invoking the relevant method on the returned annotation will result in a MirroredTypeException, from which the corresponding TypeMirror may be extracted. Similarly, attempting to read a Class[]-valued element will result in a MirroredTypesException.

Type Parameters:
A - the annotation type
Parameters:
aClass - the Class object corresponding to the annotation type
Returns:
this element's annotation for the specified annotation type if present on this element, else null


Copyright © 2010–2013 MuleSoft, Inc.. All rights reserved.