Package org.mapstruct.ap.internal.util
Class AbstractElementUtilsDecorator
java.lang.Object
org.mapstruct.ap.internal.util.AbstractElementUtilsDecorator
- All Implemented Interfaces:
Elements,ElementUtils
- Direct Known Subclasses:
EclipseElementUtilsDecorator,JavacElementUtilsDecorator
MapStruct specific abstract implementation of
ElementUtils.
This allows us to provide different implementations for different compilers and / or
to allow us for easier implementation of using the module system.-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.lang.model.util.Elements
Elements.Origin -
Method Summary
Modifier and TypeMethodDescriptionList<? extends AnnotationMirror> Finds all executable elements within the given type element, including executable elements defined in super classes and implemented interfaces.getAllEnclosedFields(TypeElement element) Finds all variable elements within the given type element, including variable elements defined in super classes and implemented interfaces and including the fields in the .getAllMembers(TypeElement type) getBinaryName(TypeElement type) getConstantExpression(Object value) Map<? extends ExecutableElement, ? extends AnnotationValue> getName(CharSequence cs) getPackageOf(Element type) getTypeElement(CharSequence name) booleanbooleanbooleanbooleanoverrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type) voidprintElements(Writer w, Element... elements) protected abstract TypeElementreplaceTypeElementIfNecessary(TypeElement element) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.lang.model.util.Elements
getAllModuleElements, getAllPackageElements, getAllTypeElements, getFileObjectOf, getModuleElement, getModuleOf, getOrigin, getOrigin, getOrigin, getOutermostTypeElement, getPackageElement, getTypeElement, isAutomaticModule, isBridge, isCanonicalConstructor, isCompactConstructor, recordComponentFor
-
Method Details
-
getPackageElement
- Specified by:
getPackageElementin interfaceElements
-
getTypeElement
- Specified by:
getTypeElementin interfaceElements
-
getElementValuesWithDefaults
public Map<? extends ExecutableElement,? extends AnnotationValue> getElementValuesWithDefaults(AnnotationMirror a) - Specified by:
getElementValuesWithDefaultsin interfaceElements
-
getDocComment
- Specified by:
getDocCommentin interfaceElements
-
isDeprecated
- Specified by:
isDeprecatedin interfaceElements
-
getBinaryName
- Specified by:
getBinaryNamein interfaceElements
-
getPackageOf
- Specified by:
getPackageOfin interfaceElements
-
getAllMembers
- Specified by:
getAllMembersin interfaceElements
-
getAllAnnotationMirrors
- Specified by:
getAllAnnotationMirrorsin interfaceElements
-
hides
-
overrides
public boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement type) -
getConstantExpression
- Specified by:
getConstantExpressionin interfaceElements
-
printElements
- Specified by:
printElementsin interfaceElements
-
getName
-
isFunctionalInterface
- Specified by:
isFunctionalInterfacein interfaceElements
-
getAllEnclosedExecutableElements
Description copied from interface:ElementUtilsFinds all executable elements within the given type element, including executable elements defined in super classes and implemented interfaces. Methods defined inObject, implementations ofObject.equals(Object)and private methods are ignored- Specified by:
getAllEnclosedExecutableElementsin interfaceElementUtils- Parameters:
element- the element to inspect- Returns:
- the executable elements usable in the type
-
getAllEnclosedFields
Description copied from interface:ElementUtilsFinds all variable elements within the given type element, including variable elements defined in super classes and implemented interfaces and including the fields in the .- Specified by:
getAllEnclosedFieldsin interfaceElementUtils- Parameters:
element- the element to inspect- Returns:
- the executable elements usable in the type
-
replaceTypeElementIfNecessary
-