Constructor and Description |
---|
TypeFactory(Elements elementUtils,
Types typeUtils,
FormattingMessager messager,
RoundContext roundContext,
Map<String,String> notToBeImportedTypes,
boolean loggingVerbose) |
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 Number
typeMirror
- 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 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.