org.mule.devkit.model
Interface Type

All Superinterfaces:
Accessible, Annotable, Documentable, Generifiable, Identifiable<TypeElement>, Typeable
All Known Subinterfaces:
EnumType, ManagedConnectionModule, MetaDataModule, Module, OAuthModule, RestModule

public interface Type
extends Identifiable<TypeElement>, Typeable

Regular Java Type


Method Summary
 String getClassName()
           
 List<Field<Type>> getFields()
           
 Method getFirstMethodAnnotatedWith(Class<? extends Annotation> anAnnotation)
           
 List<Field<Type>> getInheritedFields()
           
 List<Method<Type>> getMethods()
          Get all methods defined in this class
 List<Method<Type>> getMethodsAnnotatedWith(Class<? extends Annotation> annotation)
          Retrieves a list of methods annotated with annotation in the current module.
 Package getPackage()
           
 String getPackageName()
           
 String getPathToSourceFile()
           
 Name getQualifiedName()
           
<T> List<T>
getRecursivelyAnnotationProcessorMethodsAnnotatedWith(Class<? extends Annotation> annotation)
          Retrieves a list of methods annotated with annotation from the current module, and any of it parents.
 Method getRecursivelyFirstMethodAnnotatedWith(Class<? extends Annotation> anAnnotation)
           
<T> List<T>
getRecursivelyMethodsAnnotatedWith(Class<? extends Annotation> annotation, AnnotationProcessorFactory factory)
          Retrieves a list of methods annotated with annotation from the current module, and any of it parents.
 Type getSuperClass()
           
 boolean hasFieldAnnotatedWith(Class<? extends Annotation> annotation)
           
 boolean hasNoArgConstructor()
           
 boolean hasSuperClass()
           
 boolean inheritsFrom(Class clazz)
          Returns whether this type inherits from the provided class
 boolean inheritsFrom(Type type)
          Returns whether this type inherits from the provided type
 boolean isDsqlQueryObject()
           
 boolean isInterface()
           
 boolean isParametrized()
           
 boolean isPrimitive()
           
 
Methods inherited from interface org.mule.devkit.model.Identifiable
accept, asType, asTypeMirror, getName, isReservedIdentifier, unwrap
 
Methods inherited from interface org.mule.devkit.model.Annotable
getAnnotation, getAnnotationMirrors, hasAnnotation
 
Methods inherited from interface org.mule.devkit.model.Documentable
getJavaDocParameterSummary, getJavaDocSummary, getJavaDocTagContent, getThrowsComment, hasJavaDocTag
 
Methods inherited from interface org.mule.devkit.model.Accessible
isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic
 
Methods inherited from interface org.mule.devkit.model.Generifiable
getTypeArguments, getXmlDeclaredChilds, hasTypeArguments
 
Methods inherited from interface org.mule.devkit.model.Typeable
isArrayOrList, isBigDecimal, isBigInteger, isBoolean, isCalendar, isChar, isCollection, isComplexType, isComplexTypeWithGetterAndSetter, isDate, isDouble, isEnum, isFloat, isHttpCallback, isInteger, isLong, isMap, isNestedProcessor, isSet, isString, isURL, isXmlType
 

Method Detail

getMethodsAnnotatedWith

List<Method<Type>> getMethodsAnnotatedWith(Class<? extends Annotation> annotation)
Retrieves a list of methods annotated with annotation in the current module. This means that if the parent of the current module has more methods with the same annotation, it will not be retrieved.

Parameters:
annotation - The annotation class to discriminate the methods
Returns:
a list of methods (of type AnnotationProcessorMethodFactory) from the current module annotated with the parameter

getFirstMethodAnnotatedWith

Method getFirstMethodAnnotatedWith(Class<? extends Annotation> anAnnotation)

getRecursivelyAnnotationProcessorMethodsAnnotatedWith

<T> List<T> getRecursivelyAnnotationProcessorMethodsAnnotatedWith(Class<? extends Annotation> annotation)
Retrieves a list of methods annotated with annotation from the current module, and any of it parents.

Parameters:
annotation - The annotation class to discriminate the methods
Returns:
a complete list of methods (of type AnnotationProcessorMethodFactory) annotated with the parameter

getRecursivelyMethodsAnnotatedWith

<T> List<T> getRecursivelyMethodsAnnotatedWith(Class<? extends Annotation> annotation,
                                               AnnotationProcessorFactory factory)
Retrieves a list of methods annotated with annotation from the current module, and any of it parents.

Parameters:
annotation - The annotation class to discriminate the methods
factory - a factory to instantiate AnnotationProcessors
Returns:
a complete list of methods (of the type factory instantiates) annotated with the parameter annotation

getRecursivelyFirstMethodAnnotatedWith

Method getRecursivelyFirstMethodAnnotatedWith(Class<? extends Annotation> anAnnotation)

getFields

List<Field<Type>> getFields()

getMethods

List<Method<Type>> getMethods()
Get all methods defined in this class

Returns:
A list containing all the methods defined in this class

hasNoArgConstructor

boolean hasNoArgConstructor()

isParametrized

boolean isParametrized()

hasFieldAnnotatedWith

boolean hasFieldAnnotatedWith(Class<? extends Annotation> annotation)

isInterface

boolean isInterface()

isPrimitive

boolean isPrimitive()

getPathToSourceFile

String getPathToSourceFile()

getPackage

Package getPackage()

getClassName

String getClassName()

getQualifiedName

Name getQualifiedName()

getPackageName

String getPackageName()

inheritsFrom

boolean inheritsFrom(Class clazz)
Returns whether this type inherits from the provided class

Parameters:
clazz - class to validate inheritance
Returns:
whether the type is subclass of the provided class or not

inheritsFrom

boolean inheritsFrom(Type type)
Returns whether this type inherits from the provided type

Parameters:
type - Type to validate inheritance
Returns:
whether the type is subclass of the provided class or not

getInheritedFields

List<Field<Type>> getInheritedFields()

getSuperClass

Type getSuperClass()

hasSuperClass

boolean hasSuperClass()

isDsqlQueryObject

boolean isDsqlQueryObject()


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