public class TypeWrapper extends Object implements Type
| Constructor and Description |
|---|
TypeWrapper(Class<?> aClass,
org.mule.metadata.api.ClassTypeLoader typeLoader) |
TypeWrapper(org.springframework.core.ResolvableType resolvableType,
org.mule.metadata.api.ClassTypeLoader typeLoader) |
TypeWrapper(Type type,
org.mule.metadata.api.ClassTypeLoader typeLoader) |
| Modifier and Type | Method and Description |
|---|---|
org.mule.metadata.api.model.MetadataType |
asMetadataType() |
boolean |
equals(Object o) |
List<FieldElement> |
getAnnotatedFields(Class<? extends Annotation>... annotations) |
<A extends Annotation> |
getAnnotation(Class<A> annotationClass)
Retrieves an annotation of the
WithAnnotations component |
org.mule.metadata.java.api.annotation.ClassInformationAnnotation |
getClassInformation() |
Optional<Class<?>> |
getDeclaringClass() |
Optional<TypeElement> |
getElement() |
List<FieldElement> |
getFields() |
List<TypeGeneric> |
getGenerics() |
Optional<MethodElement> |
getMethod(String name,
Class<?>... objects) |
String |
getName()
Returns the component's name
|
List<PropertyElement> |
getProperties() |
List<Type> |
getSuperTypeGenerics(Class superType) |
String |
getTypeName() |
<A extends Annotation> |
getValueFromAnnotation(Class<A> annotationClass)
Returns an optional
AnnotationValueFetcher which encapsulates the logic of obtaining annotations values
when executing with classes or with the Java AST. |
int |
hashCode() |
boolean |
isAnyType() |
boolean |
isAssignableFrom(Class<?> clazz)
Checks the assignability of the current type from the given
Class |
boolean |
isAssignableFrom(Type type)
Checks the assignability of the current type from the given
Type |
boolean |
isAssignableTo(Class<?> clazz)
Checks the assignability of the current type to the given
Class |
boolean |
isAssignableTo(Type type)
Checks the assignability of the current type to the given
Type |
boolean |
isInstantiable() |
boolean |
isSameType(Class<?> clazz)
Checks equality of the current type to the given
Class |
boolean |
isSameType(Type type)
Checks equality of the current type to the given
Type |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetInterfaceGenericsgetAlias, getDescriptionisAnnotatedWithpublic TypeWrapper(Class<?> aClass, org.mule.metadata.api.ClassTypeLoader typeLoader)
public TypeWrapper(org.springframework.core.ResolvableType resolvableType,
org.mule.metadata.api.ClassTypeLoader typeLoader)
public TypeWrapper(Type type, org.mule.metadata.api.ClassTypeLoader typeLoader)
public <A extends Annotation> Optional<A> getAnnotation(Class<A> annotationClass)
WithAnnotations componentgetAnnotation in interface WithAnnotationsA - The annotation typeannotationClass - Of the annotation to retrieveOptional annotation to retrievepublic <A extends Annotation> Optional<AnnotationValueFetcher<A>> getValueFromAnnotation(Class<A> annotationClass)
WithAnnotationsAnnotationValueFetcher which encapsulates the logic of obtaining annotations values
when executing with classes or with the Java AST.getValueFromAnnotation in interface WithAnnotationsA - The annotation typeannotationClass - Of the annotation to retrieveOptional AnnotationValueFetcher to retrievepublic List<FieldElement> getFields()
getFields in interface TypeFieldElement that represent the list of Field that the Type declarespublic List<PropertyElement> getProperties()
getProperties in interface TypeFieldElement that represent the list of Field propertyes that the Type declarespublic List<FieldElement> getAnnotatedFields(Class<? extends Annotation>... annotations)
getAnnotatedFields in interface Typeannotations - classes that the fields of this type should be annotated withFieldElement that represent the list of Field that the Type declares and are
annotated with the given annotationpublic Optional<Class<?>> getDeclaringClass()
getDeclaringClass in interface WithDeclaringClassType representspublic boolean isAssignableFrom(Class<?> clazz)
TypeClassisAssignableFrom in interface Typeclazz - The class to checkpublic boolean isAssignableFrom(Type type)
TypeTypeisAssignableFrom in interface Typetype - The type to checkTypepublic boolean isAssignableTo(Class<?> clazz)
TypeClassisAssignableTo in interface Typeclazz - The class to checkpublic boolean isAssignableTo(Type type)
TypeTypeisAssignableTo in interface Typetype - The type to checkTypepublic boolean isSameType(Type type)
TypeTypeisSameType in interface Typetype - The type to check equalitypublic boolean isSameType(Class<?> clazz)
TypeClassisSameType in interface Typeclazz - The type to check equalitypublic boolean isInstantiable()
isInstantiable in interface Typepublic String getTypeName()
getTypeName in interface Typepublic org.mule.metadata.java.api.annotation.ClassInformationAnnotation getClassInformation()
getClassInformation in interface TypeClassInformationAnnotation describing the current Typepublic boolean isAnyType()
public List<TypeGeneric> getGenerics()
getGenerics in interface Typepublic org.mule.metadata.api.model.MetadataType asMetadataType()
asMetadataType in interface TypeMetadataTypepublic List<Type> getSuperTypeGenerics(Class superType)
getSuperTypeGenerics in interface TypesuperType - The Class with generics, this can be a Interface or a normal Classpublic Optional<TypeElement> getElement()
TypegetElement in interface TypegetElement in interface WithElementOptional Element representing the component that implements this interface.public Optional<MethodElement> getMethod(String name, Class<?>... objects)
getMethod in interface TypeMethodElement if presentCopyright © 2003–2020 MuleSoft, Inc.. All rights reserved.