Package net.bytebuddy.dynamic.scaffold
Interface FieldLocator
-
- All Known Implementing Classes:
FieldLocator.AbstractBase,FieldLocator.ForClassHierarchy,FieldLocator.ForExactType,FieldLocator.ForTopLevelType,FieldLocator.NoOp
public interface FieldLocatorA 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 classFieldLocator.AbstractBaseAn abstract base implementation of a field locator.static interfaceFieldLocator.FactoryA factory for creating aFieldLocator.static classFieldLocator.ForClassHierarchyA field locator that looks up fields that are declared within a class's class hierarchy.static classFieldLocator.ForExactTypeA field locator that only looks up fields that are declared by a specific type.static classFieldLocator.ForTopLevelTypeA field locator that only locates fields in the top-level type.static classFieldLocator.NoOpA field locator that never discovers a field.static interfaceFieldLocator.ResolutionA resolution for a field lookup.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldLocator.Resolutionlocate(java.lang.String name)Locates a field with the given name and throws an exception if no such type exists.FieldLocator.Resolutionlocate(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.
-
-