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 Classes Modifier and Type Interface Description static class
FieldLocator.AbstractBase
An abstract base implementation of a field locator.static interface
FieldLocator.Factory
A factory for creating aFieldLocator
.static class
FieldLocator.ForClassHierarchy
A field locator that looks up fields that are declared within a class's class hierarchy.static class
FieldLocator.ForExactType
A field locator that only looks up fields that are declared by a specific type.static class
FieldLocator.ForTopLevelType
A field locator that only locates fields in the top-level type.static class
FieldLocator.NoOp
A field locator that never discovers a field.static interface
FieldLocator.Resolution
A resolution for a field lookup.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldLocator.Resolution
locate(java.lang.String name)
Locates a field with the given name and throws an exception if no such type exists.FieldLocator.Resolution
locate(java.lang.String name, TypeDescription type)
Locates a field with the given name and type and throws an exception if no such type exists.
-
-
-
Method Detail
-
locate
FieldLocator.Resolution locate(java.lang.String name)
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
FieldLocator.Resolution locate(java.lang.String name, TypeDescription type)
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.
-
-