Class FieldLocator.ForExactType
java.lang.Object
net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
net.bytebuddy.dynamic.scaffold.FieldLocator.ForExactType
- All Implemented Interfaces:
FieldLocator
- Enclosing interface:
FieldLocator
A field locator that only looks up fields that are declared by a specific type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA factory for creating aFieldLocator.ForExactType.Nested classes/interfaces inherited from interface FieldLocator
FieldLocator.AbstractBase, FieldLocator.ForClassHierarchy, FieldLocator.ForExactType, FieldLocator.ForTopLevelType, FieldLocator.NoOp, FieldLocator.Resolution -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescriptionThe type for which to look up fields.Fields inherited from class FieldLocator.AbstractBase
accessingType -
Constructor Summary
ConstructorsConstructorDescriptionForExactType(TypeDescription typeDescription) Creates a new field locator for locating fields from a declared type.ForExactType(TypeDescription typeDescription, TypeDescription accessingType) Creates a new field locator for locating fields from a declared type. -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher) Locates fields that match the given matcher.Methods inherited from class FieldLocator.AbstractBase
locate, locate
-
Field Details
-
typeDescription
The type for which to look up fields.
-
-
Constructor Details
-
ForExactType
Creates a new field locator for locating fields from a declared type.- Parameters:
typeDescription- The type for which to look up fields that is also providing the accessing type.
-
ForExactType
Creates a new field locator for locating fields from a declared type.- Parameters:
typeDescription- The type for which to look up fields.accessingType- The accessing type.
-
-
Method Details
-
locate
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.
-