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.
  • Field Details

    • fieldDescription

      private final FieldDescription fieldDescription
      A description of the located field.
  • Constructor Details

    • Simple

      protected Simple(FieldDescription fieldDescription)
      Creates a new simple resolution for a field.
      Parameters:
      fieldDescription - A description of the located field.
  • Method Details

    • isResolved

      public boolean isResolved()
      Returns true if a field was located.
      Specified by:
      isResolved in interface FieldLocator.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 interface FieldLocator.Resolution
      Returns:
      The located field.