Package net.bytebuddy.dynamic.scaffold
Class FieldLocator.Resolution.Simple
java.lang.Object
net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.Simple
- All Implemented Interfaces:
FieldLocator.Resolution
- Enclosing interface:
- FieldLocator.Resolution
@Enhance
public static class FieldLocator.Resolution.Simple
extends Object
implements FieldLocator.Resolution
A simple implementation for a field resolution.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution
FieldLocator.Resolution.Illegal, FieldLocator.Resolution.Simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldDescription
A description of the located field. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Simple
(FieldDescription fieldDescription) Creates a new simple resolution for a field. -
Method Summary
Modifier and TypeMethodDescriptiongetField()
Returns the field description if a field was located.boolean
Returnstrue
if a field was located.
-
Field Details
-
fieldDescription
A description of the located field.
-
-
Constructor Details
-
Simple
Creates a new simple resolution for a field.- Parameters:
fieldDescription
- A description of the located field.
-
-
Method Details
-
isResolved
public boolean isResolved()Returnstrue
if a field was located.- Specified by:
isResolved
in interfaceFieldLocator.Resolution
- Returns:
true
if a field was located.
-
getField
Returns the field description if a field was located. This method must only be called if this resolution was actually resolved.- Specified by:
getField
in interfaceFieldLocator.Resolution
- Returns:
- The located field.
-