Package net.bytebuddy.dynamic.scaffold
Class FieldLocator.AbstractBase
java.lang.Object
net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
- All Implemented Interfaces:
FieldLocator
- Direct Known Subclasses:
FieldLocator.ForClassHierarchy,FieldLocator.ForExactType,FieldLocator.ForTopLevelType
- Enclosing interface:
FieldLocator
@Enhance
public abstract static class FieldLocator.AbstractBase
extends Object
implements FieldLocator
An abstract base implementation of a field locator.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.FieldLocator
FieldLocator.AbstractBase, FieldLocator.Factory, FieldLocator.ForClassHierarchy, FieldLocator.ForExactType, FieldLocator.ForTopLevelType, FieldLocator.NoOp, FieldLocator.Resolution -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBase(TypeDescription accessingType) Creates a new field locator. -
Method Summary
Modifier and TypeMethodDescriptionLocates a field with the given name and throws an exception if no such type exists.locate(String name, TypeDescription type) Locates a field with the given name and type and throws an exception if no such type exists.protected abstract FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher) Locates fields that match the given matcher.
-
Field Details
-
accessingType
The type accessing the field.
-
-
Constructor Details
-
AbstractBase
Creates a new field locator.- Parameters:
accessingType- The type accessing the field.
-
-
Method Details
-
locate
Locates a field with the given name and throws an exception if no such type exists.- Specified by:
locatein interfaceFieldLocator- Parameters:
name- The name of the field to locate.- Returns:
- A resolution for a field lookup.
-
locate
Locates a field with the given name and type and throws an exception if no such type exists.- Specified by:
locatein interfaceFieldLocator- Parameters:
name- The name of the field to locate.type- The type fo the field to locate.- Returns:
- A resolution for a field lookup.
-
locate
Locates fields that match the given matcher.- Parameters:
matcher- The matcher that identifies fields of interest.- Returns:
- A list of fields that match the specified matcher.
-