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 java.lang.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
Fields Modifier and Type Field Description private FieldDescription
fieldDescription
A description of the located field.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Simple(FieldDescription fieldDescription)
Creates a new simple resolution for a field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDescription
getField()
Returns the field description if a field was located.boolean
isResolved()
Returnstrue
if a field was located.
-
-
-
Field Detail
-
fieldDescription
private final FieldDescription fieldDescription
A description of the located field.
-
-
Constructor Detail
-
Simple
protected Simple(FieldDescription fieldDescription)
Creates a new simple resolution for a field.- Parameters:
fieldDescription
- A description of the located field.
-
-
Method Detail
-
isResolved
public boolean isResolved()
Returnstrue
if a field was located.- Specified by:
isResolved
in interfaceFieldLocator.Resolution
- Returns:
true
if a field was located.
-
getField
public FieldDescription 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.
-
-