Package net.bytebuddy.dynamic.scaffold
Interface FieldLocator
- All Known Implementing Classes:
FieldLocator.AbstractBase,FieldLocator.ForClassHierarchy,FieldLocator.ForExactType,FieldLocator.ForTopLevelType,FieldLocator.NoOp
public interface FieldLocator
A field locator offers an interface for locating a field that is declared by a specified type.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn abstract base implementation of a field locator.static interfaceA factory for creating aFieldLocator.static classA field locator that looks up fields that are declared within a class's class hierarchy.static classA field locator that only looks up fields that are declared by a specific type.static classA field locator that only locates fields in the top-level type.static enumA field locator that never discovers a field.static interfaceA resolution for a field lookup. -
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.
-
Method Details
-
locate
Locates a field with the given name and throws an exception if no such type exists.- 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.- Parameters:
name- The name of the field to locate.type- The type fo the field to locate.- Returns:
- A resolution for a field lookup.
-