Interface MemberUtils
-
-
Method Summary
Static Methods Modifier and Type Method Description static <T extends javax.lang.model.element.Element>
java.util.List<T>findAllDeclaredMembers(javax.lang.model.element.TypeElement type, java.util.function.Predicate<? super T>... memberFilters)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeElement
, optionally filtered by one or more predicates.static <T extends javax.lang.model.element.Element>
java.util.List<T>findAllDeclaredMembers(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<? super T>... memberFilters)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeMirror
, optionally filtered by one or more predicates.static <T extends javax.lang.model.element.Element>
java.util.List<T>findDeclaredMembers(javax.lang.model.element.TypeElement type, boolean all, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeElement
, optionally including members from superclasses and interfaces, and filtered by one or more predicates.static <T extends javax.lang.model.element.Element>
java.util.List<T>findDeclaredMembers(javax.lang.model.element.TypeElement type, java.util.function.Predicate<? super T>... memberFilters)
Returns the directly declared members of the providedTypeElement
, optionally filtered by one or more predicates.static <T extends javax.lang.model.element.Element>
java.util.List<T>findDeclaredMembers(javax.lang.model.type.TypeMirror type, boolean includeHierarchicalTypes, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeMirror
, optionally including members from superclasses and interfaces, and filtered by one or more predicates.static <T extends javax.lang.model.element.Element>
java.util.List<T>findDeclaredMembers(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeMirror
that match the given filters.static java.util.List<? extends javax.lang.model.element.Element>
getAllDeclaredMembers(javax.lang.model.element.TypeElement type)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeElement
.static java.util.List<? extends javax.lang.model.element.Element>
getAllDeclaredMembers(javax.lang.model.type.TypeMirror type)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeMirror
.static java.util.List<? extends javax.lang.model.element.Element>
getDeclaredMembers(javax.lang.model.element.TypeElement type)
Returns the directly declared members of the providedTypeElement
.static java.util.List<? extends javax.lang.model.element.Element>
getDeclaredMembers(javax.lang.model.element.TypeElement type, boolean includeHierarchicalTypes)
Returns the declared members of the providedTypeElement
, optionally including members from superclasses and interfaces.static java.util.List<? extends javax.lang.model.element.Element>
getDeclaredMembers(javax.lang.model.type.TypeMirror type)
Returns the directly declared members of the providedTypeMirror
.static java.util.List<? extends javax.lang.model.element.Element>
getDeclaredMembers(javax.lang.model.type.TypeMirror type, boolean includeHierarchicalTypes)
Returns the declared members of the providedTypeMirror
, optionally including hierarchical types.
-
-
-
Method Detail
-
getDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getDeclaredMembers(javax.lang.model.type.TypeMirror type)
Returns the directly declared members of the providedTypeMirror
. If the given type isnull
, an empty list will be returned.- Parameters:
type
- the type mirror to retrieve declared members from- Returns:
- a list of directly declared members, or an empty list if the type is
null
-
getDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getDeclaredMembers(javax.lang.model.element.TypeElement type)
Returns the directly declared members of the providedTypeElement
. If the given type isnull
, an empty list will be returned.- Parameters:
type
- the type element to retrieve declared members from- Returns:
- a list of directly declared members, or an empty list if the type is
null
-
getAllDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getAllDeclaredMembers(javax.lang.model.type.TypeMirror type)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeMirror
. If the given type isnull
, an empty list will be returned.- Parameters:
type
- the type mirror to retrieve all declared members from- Returns:
- a list of all declared members, or an empty list if the type is
null
-
getAllDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getAllDeclaredMembers(javax.lang.model.element.TypeElement type)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeElement
. If the given type isnull
, an empty list will be returned.- Parameters:
type
- the type element to retrieve all declared members from- Returns:
- a list of all declared members, or an empty list if the type is
null
-
getDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getDeclaredMembers(javax.lang.model.type.TypeMirror type, boolean includeHierarchicalTypes)
Returns the declared members of the providedTypeMirror
, optionally including hierarchical types. If the given type isnull
, an empty list will be returned.- Parameters:
type
- the type mirror to retrieve declared members fromincludeHierarchicalTypes
- whether to include members from superclasses and interfaces- Returns:
- a list of declared members, or an empty list if the type is
null
-
getDeclaredMembers
static java.util.List<? extends javax.lang.model.element.Element> getDeclaredMembers(javax.lang.model.element.TypeElement type, boolean includeHierarchicalTypes)
Returns the declared members of the providedTypeElement
, optionally including members from superclasses and interfaces.If the given type is
null
, an empty list will be returned.- Parameters:
type
- the type element to retrieve declared members fromincludeHierarchicalTypes
- whether to include members from superclasses and interfaces- Returns:
- a list of declared members, or an empty list if the type is
null
-
findDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findDeclaredMembers(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeMirror
that match the given filters. If the given type isnull
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type mirror to retrieve declared members frommemberFilters
- the predicates used to filter members- Returns:
- a list of declared members matching the filters, or an empty list if the type is
null
-
findDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findDeclaredMembers(javax.lang.model.element.TypeElement type, java.util.function.Predicate<? super T>... memberFilters)
Returns the directly declared members of the providedTypeElement
, optionally filtered by one or more predicates.If the given type is
null
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type element to retrieve declared members frommemberFilters
- the predicates used to filter members- Returns:
- a list of declared members matching the filters, or an empty list if the type is
null
-
findAllDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findAllDeclaredMembers(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<? super T>... memberFilters)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeMirror
, optionally filtered by one or more predicates.If the given type is
null
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type mirror to retrieve all declared members frommemberFilters
- the predicates used to filter members- Returns:
- a list of all declared members matching the filters, or an empty list if the type is
null
-
findAllDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findAllDeclaredMembers(javax.lang.model.element.TypeElement type, java.util.function.Predicate<? super T>... memberFilters)
Returns all declared members (including those from superclasses and interfaces) of the providedTypeElement
, optionally filtered by one or more predicates.If the given type is
null
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type element to retrieve all declared members frommemberFilters
- the predicates used to filter members- Returns:
- a list of all declared members matching the filters, or an empty list if the type is
null
-
findDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findDeclaredMembers(javax.lang.model.type.TypeMirror type, boolean includeHierarchicalTypes, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeMirror
, optionally including members from superclasses and interfaces, and filtered by one or more predicates.If the given type is
null
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type mirror to retrieve declared members fromincludeHierarchicalTypes
- whether to include members from superclasses and interfacesmemberFilters
- the predicates used to filter members- Returns:
- a list of declared members matching the filters, or an empty list if the type is
null
-
findDeclaredMembers
static <T extends javax.lang.model.element.Element> java.util.List<T> findDeclaredMembers(javax.lang.model.element.TypeElement type, boolean all, java.util.function.Predicate<? super T>... memberFilters)
Returns the declared members of the providedTypeElement
, optionally including members from superclasses and interfaces, and filtered by one or more predicates.If the given type is
null
, an empty list will be returned.- Type Parameters:
T
- the type of elements to filter- Parameters:
type
- the type element to retrieve declared members fromall
- whether to include members from superclasses and interfacesmemberFilters
- the predicates used to filter members- Returns:
- a list of declared members matching the filters, or an empty list if the type is
null
-
-