public class Executables extends Object
ExecutableElement
s.Modifier and Type | Method and Description |
---|---|
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 |
getCollectionGetterName(ExecutableElement targetSetter) |
static String |
getElementNameForAdder(ExecutableElement adderMethod) |
static String |
getPropertyName(ExecutableElement getterOrSetterMethod) |
static boolean |
isAdderMethod(ExecutableElement method) |
static boolean |
isAfterMappingMethod(ExecutableElement executableElement) |
static boolean |
isBeforeMappingMethod(ExecutableElement executableElement) |
static boolean |
isDefaultMethod(ExecutableElement method) |
static boolean |
isGetterMethod(ExecutableElement method) |
static boolean |
isLifecycleCallbackMethod(ExecutableElement executableElement) |
static boolean |
isSetterMethod(ExecutableElement method) |
public static boolean isGetterMethod(ExecutableElement method)
public static boolean isSetterMethod(ExecutableElement method)
public static boolean isAdderMethod(ExecutableElement method)
public static String getPropertyName(ExecutableElement getterOrSetterMethod)
public static boolean isDefaultMethod(ExecutableElement method)
public static String getElementNameForAdder(ExecutableElement adderMethod)
adderMethod
- the adder methodaddChild(Child v)
, the element name would be 'Child'.public static String getCollectionGetterName(ExecutableElement targetSetter)
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 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-2015 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.