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 class
An abstract base implementation of a field locator.static interface
A factory for creating aFieldLocator
.static class
A field locator that looks up fields that are declared within a class's class hierarchy.static class
A field locator that only looks up fields that are declared by a specific type.static class
A field locator that only locates fields in the top-level type.static enum
A field locator that never discovers a field.static interface
A 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.
-