Package net.bytebuddy.dynamic.scaffold
Class FieldLocator.ForClassHierarchy
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
-
- net.bytebuddy.dynamic.scaffold.FieldLocator.ForClassHierarchy
-
- All Implemented Interfaces:
FieldLocator
- Enclosing interface:
- FieldLocator
@Enhance public static class FieldLocator.ForClassHierarchy extends FieldLocator.AbstractBase
A field locator that looks up fields that are declared within a class's class hierarchy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldLocator.ForClassHierarchy.FactoryA factory for creating aFieldLocator.ForClassHierarchy.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.FieldLocator
FieldLocator.AbstractBase, FieldLocator.ForClassHierarchy, FieldLocator.ForExactType, FieldLocator.ForTopLevelType, FieldLocator.NoOp, FieldLocator.Resolution
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescriptiontypeDescriptionThe type for which to look up a field within its class hierarchy.-
Fields inherited from class net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
accessingType
-
-
Constructor Summary
Constructors Constructor Description ForClassHierarchy(TypeDescription typeDescription)Creates a field locator that looks up fields that are declared within a class's class hierarchy.ForClassHierarchy(TypeDescription typeDescription, TypeDescription accessingType)Creates a field locator that looks up fields that are declared within a class's class hierarchy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldList<?>locate(ElementMatcher<? super FieldDescription> matcher)Locates fields that match the given matcher.-
Methods inherited from class net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
locate, locate
-
-
-
-
Field Detail
-
typeDescription
private final TypeDescription typeDescription
The type for which to look up a field within its class hierarchy.
-
-
Constructor Detail
-
ForClassHierarchy
public ForClassHierarchy(TypeDescription typeDescription)
Creates a field locator that looks up fields that are declared within a class's class hierarchy.- Parameters:
typeDescription- The type for which to look up a field within its class hierarchy which is also the accessing type.
-
ForClassHierarchy
public ForClassHierarchy(TypeDescription typeDescription, TypeDescription accessingType)
Creates a field locator that looks up fields that are declared within a class's class hierarchy.- Parameters:
typeDescription- The type for which to look up a field within its class hierarchy.accessingType- The accessing type.
-
-
Method Detail
-
locate
protected FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)
Description copied from class:FieldLocator.AbstractBaseLocates fields that match the given matcher.- Specified by:
locatein classFieldLocator.AbstractBase- Parameters:
matcher- The matcher that identifies fields of interest.- Returns:
- A list of fields that match the specified matcher.
-
-