public class Executables extends Object
ExecutableElement
s.Modifier and Type | Method and Description |
---|---|
static List<Accessor> |
getAllEnclosedAccessors(Elements elementUtils,
TypeElement element)
Finds all executable elements/variable elements within the given type element, including executable/variable
elements defined in super classes and implemented interfaces and including the fields in the .
|
static List<ExecutableElement> |
getAllEnclosedExecutableElements(Elements elementUtils,
TypeElement element)
Finds all executable elements within the given type element, including executable elements defined in super
classes and implemented interfaces.
|
static String |
getElementNameForAdder(Accessor adderMethod) |
static String |
getPropertyName(Accessor accessor) |
static boolean |
isAdderMethod(Accessor method) |
static boolean |
isAfterMappingMethod(ExecutableElement executableElement) |
static boolean |
isBeforeMappingMethod(ExecutableElement executableElement) |
static boolean |
isDefaultMethod(ExecutableElement method) |
static boolean |
isFieldAccessor(Accessor accessor)
An
Accessor is a field accessor, if it doesn't have an executable element, is public and it is not
static. |
static boolean |
isFinal(Accessor accessor) |
static boolean |
isGetterMethod(Accessor method) |
static boolean |
isLifecycleCallbackMethod(ExecutableElement executableElement) |
static boolean |
isPresenceCheckMethod(Accessor method) |
static boolean |
isSetterMethod(Accessor method) |
public static boolean isGetterMethod(Accessor method)
public static boolean isFieldAccessor(Accessor accessor)
Accessor
is a field accessor, if it doesn't have an executable element, is public and it is not
static.accessor
- the accessor to ber checkedtrue
if the accessor
is for a public
non static
field.public static boolean isPresenceCheckMethod(Accessor method)
public static boolean isSetterMethod(Accessor method)
public static boolean isAdderMethod(Accessor method)
public static boolean isFinal(Accessor accessor)
public static boolean isDefaultMethod(ExecutableElement method)
public static String getElementNameForAdder(Accessor adderMethod)
adderMethod
- the adder methodaddChild(Child v)
, the element name would be 'Child'.public static List<ExecutableElement> getAllEnclosedExecutableElements(Elements elementUtils, TypeElement element)
Object
are ignored, as well as
implementations of Object.equals(Object)
.elementUtils
- element helperelement
- the element to inspectpublic static List<Accessor> getAllEnclosedAccessors(Elements elementUtils, TypeElement element)
Object
are ignored, as well as implementations of Object.equals(Object)
.elementUtils
- element helperelement
- the element to inspectpublic static boolean isLifecycleCallbackMethod(ExecutableElement executableElement)
executableElement
- the element to checktrue
, if the executable element is a method annotated with @BeforeMapping
or
@AfterMapping
public static boolean isAfterMappingMethod(ExecutableElement executableElement)
executableElement
- the element to checktrue
, if the executable element is a method annotated with @AfterMapping
public static boolean isBeforeMappingMethod(ExecutableElement executableElement)
executableElement
- the element to checktrue
, if the executable element is a method annotated with @BeforeMapping
Copyright © 2012-2017 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.