| Constructor and Description |
|---|
TypeFactory(Elements elementUtils,
Types typeUtils,
FormattingMessager messager,
RoundContext roundContext,
Map<String,String> notToBeImportedTypes,
boolean loggingVerbose) |
| Modifier and Type | Method and Description |
|---|---|
BuilderType |
builderTypeFor(Type type,
org.mapstruct.ap.internal.gem.BuilderGem builder) |
Type |
classTypeOf(Type type)
Returns the Type that represents the declared Class type of the given type.
|
Type |
createVoidType()
creates a void return type
|
Type |
effectiveResultTypeFor(Type type,
org.mapstruct.ap.internal.gem.BuilderGem builder) |
TypeMirror |
getMethodType(DeclaredType includingType,
Element method)
Get the Type for given method as part of usedMapper.
|
ExecutableType |
getMethodType(DeclaredType includingType,
ExecutableElement method)
Get the ExecutableType for given method as part of usedMapper.
|
List<Parameter> |
getParameters(DeclaredType includingType,
Accessor accessor) |
List<Parameter> |
getParameters(DeclaredType includingType,
ExecutableElement method) |
List<Parameter> |
getParameters(ExecutableType methodType,
ExecutableElement method) |
Type |
getReturnType(DeclaredType includingType,
Accessor accessor) |
Type |
getReturnType(ExecutableType method) |
Parameter |
getSingleParameter(DeclaredType includingType,
Accessor method) |
List<Type> |
getThrownTypes(Accessor accessor) |
List<Type> |
getThrownTypes(ExecutableType method) |
Type |
getType(Class<?> type) |
Type |
getType(String canonicalName) |
Type |
getType(TypeElement typeElement) |
Type |
getType(TypeMirror mirror) |
TypeMirror |
getTypeBound(TypeMirror typeMirror)
Establishes the type bound:
<? extends Number>, returns Number
<? super Number>, returns Number
<?>, returns Object
<T extends Number>, returns Number
|
Type |
getTypeForLiteral(Class<?> type) |
Type |
getWrappedType(Type type) |
boolean |
isTypeAvailable(String canonicalName)
Determines if the type with the given full qualified name is part of the classpath
|
public TypeFactory(Elements elementUtils, Types typeUtils, FormattingMessager messager, RoundContext roundContext, Map<String,String> notToBeImportedTypes, boolean loggingVerbose)
public boolean isTypeAvailable(String canonicalName)
canonicalName - Name of the type to be checked for availabilitypublic Type getType(TypeElement typeElement)
public Type getType(TypeMirror mirror)
public Type classTypeOf(Type type)
java.lang.Integer, it will return the type that represents Class<Integer>.
int, it will return the type that represents Class<Integer>.type - the type to return the declared class type forClass<type>.public ExecutableType getMethodType(DeclaredType includingType, ExecutableElement method)
ExecutableElement directly.includingType - the type on which's scope the method type shall be evaluatedmethod - the methodpublic TypeMirror getMethodType(DeclaredType includingType, Element method)
includingType - the type on which's scope the method type shall be evaluatedmethod - the methodpublic Parameter getSingleParameter(DeclaredType includingType, Accessor method)
public List<Parameter> getParameters(DeclaredType includingType, Accessor accessor)
public List<Parameter> getParameters(DeclaredType includingType, ExecutableElement method)
public List<Parameter> getParameters(ExecutableType methodType, ExecutableElement method)
public Type getReturnType(DeclaredType includingType, Accessor accessor)
public Type getReturnType(ExecutableType method)
public List<Type> getThrownTypes(ExecutableType method)
public Type createVoidType()
public TypeMirror getTypeBound(TypeMirror typeMirror)
<? extends Number>, returns Number<? super Number>, returns Number<?>, returns Object<T extends Number>, returns NumbertypeMirror - the type to return the bound forpublic BuilderType builderTypeFor(Type type, org.mapstruct.ap.internal.gem.BuilderGem builder)
public Type effectiveResultTypeFor(Type type, org.mapstruct.ap.internal.gem.BuilderGem builder)
Copyright © 2012–2021. All rights reserved.