Top Description Inners Methods
net.bytebuddy.dynamic.scaffold

public Interface FieldLocator

Known Direct Implementers
net.bytebuddy.dynamic.scaffold.FieldLocator.NoOp, net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.field.FieldDescription, .FieldList, net.bytebuddy.description.method.MethodDescription, net.bytebuddy.description.type.TypeDefinition, .TypeDescription, net.bytebuddy.matcher.ElementMatcher

A field locator offers an interface for locating a field that is declared by a specified type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
FieldLocator.AbstractBase

An abstract base implementation of a field locator.

public static interface
FieldLocator.Factory

A factory for creating a FieldLocator.

public static class
FieldLocator.ForClassHierarchy

A field locator that looks up fields that are declared within a class's class hierarchy.

public static class
FieldLocator.ForExactType

A field locator that only looks up fields that are declared by a specific type.

public static class
FieldLocator.ForTopLevelType

A field locator that only locates fields in the top-level type.

public static enum
FieldLocator.NoOp

A field locator that never discovers a field.

public static interface
FieldLocator.Resolution

A resolution for a field lookup.

Method Summary

Modifier and TypeMethod and Description
public FieldLocator.Resolution

Returns:

A resolution for a field lookup.
locate
(String
The name of the field to locate.
name
)

Locates a field with the given name and throws an exception if no such type exists.

public FieldLocator.Resolution

Returns:

A resolution for a field lookup.
locate
(String
The name of the field to locate.
name
,
TypeDescription
The type fo the field to locate.
type
)

Locates a field with the given name and type and throws an exception if no such type exists.

Method Detail

locateback to summary
public FieldLocator.Resolution locate(String name)

Locates a field with the given name and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

locateback to summary
public FieldLocator.Resolution locate(String name, TypeDescription type)

Locates a field with the given name and type and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

type:TypeDescription

The type fo the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

net.bytebuddy.dynamic.scaffold back to summary

public abstract Class FieldLocator.AbstractBase

extends Object
implements FieldLocator
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator
Known Direct Subclasses
net.bytebuddy.dynamic.scaffold.FieldLocator.ForExactType, net.bytebuddy.dynamic.scaffold.FieldLocator.ForClassHierarchy, net.bytebuddy.dynamic.scaffold.FieldLocator.ForTopLevelType
Annotations
@Enhance

An abstract base implementation of a field locator.

Field Summary

Modifier and TypeField and Description
protected final TypeDescription
accessingType

The type accessing the field.

Constructor Summary

AccessConstructor and Description
protected
AbstractBase(TypeDescription
The type accessing the field.
accessingType
)

Creates a new field locator.

Method Summary

Modifier and TypeMethod and Description
public FieldLocator.Resolution
locate(String
The name of the field to locate.
name
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and throws an exception if no such type exists.
public FieldLocator.Resolution
locate(String
The name of the field to locate.
name
,
TypeDescription
The type fo the field to locate.
type
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and type and throws an exception if no such type exists.
protected abstract FieldList<?>

Returns:

A list of fields that match the specified matcher.
locate
(ElementMatcher<? super FieldDescription>
The matcher that identifies fields of interest.
matcher
)

Locates fields that match the given matcher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessingTypeback to summary
protected final TypeDescription accessingType

The type accessing the field.

Constructor Detail

AbstractBaseback to summary
protected AbstractBase(TypeDescription accessingType)

Creates a new field locator.

Parameters
accessingType:TypeDescription

The type accessing the field.

Method Detail

locateback to summary
public FieldLocator.Resolution locate(String name)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

locateback to summary
public FieldLocator.Resolution locate(String name, TypeDescription type)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and type and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

type:TypeDescription

The type fo the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

locateback to summary
protected abstract FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)

Locates fields that match the given matcher.

Parameters
matcher:ElementMatcher<? super FieldDescription>

The matcher that identifies fields of interest.

Returns:FieldList<?>

A list of fields that match the specified matcher.

net.bytebuddy.dynamic.scaffold back to summary

public Interface FieldLocator.Factory

Known Direct Implementers
net.bytebuddy.dynamic.scaffold.FieldLocator.NoOp, net.bytebuddy.dynamic.scaffold.FieldLocator.ForExactType.Factory, net.bytebuddy.dynamic.scaffold.FieldLocator.ForClassHierarchy.Factory, net.bytebuddy.dynamic.scaffold.FieldLocator.ForTopLevelType.Factory

A factory for creating a FieldLocator.

Method Summary

Modifier and TypeMethod and Description
public FieldLocator

Returns:

A suitable field locator.
make
(TypeDescription
The type for which to create a field locator.
typeDescription
)

Creates a field locator for a given type.

Method Detail

makeback to summary
public FieldLocator make(TypeDescription typeDescription)

Creates a field locator for a given type.

Parameters
typeDescription:TypeDescription

The type for which to create a field locator.

Returns:FieldLocator

A suitable field locator.

net.bytebuddy.dynamic.scaffold back to summary

public Class FieldLocator.ForClassHierarchy

extends AbstractBase
Class Inheritance
Annotations
@Enhance

A field locator that looks up fields that are declared within a class's class hierarchy.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type for which to look up a field within its class hierarchy.

Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
accessingType

Constructor Summary

AccessConstructor and Description
public
ForClassHierarchy(TypeDescription
The type for which to look up a field within its class hierarchy which is also the accessing type.
typeDescription
)

Creates a field locator that looks up fields that are declared within a class's class hierarchy.

public
ForClassHierarchy(TypeDescription
The type for which to look up a field within its class hierarchy.
typeDescription
,
TypeDescription
The accessing type.
accessingType
)

Creates a field locator that looks up fields that are declared within a class's class hierarchy.

Method Summary

Modifier and TypeMethod and Description
protected FieldList<?>
locate(ElementMatcher<? super FieldDescription>
The matcher that identifies fields of interest.
matcher
)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.
Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
locatelocate

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type for which to look up a field within its class hierarchy.

Constructor Detail

ForClassHierarchyback to summary
public ForClassHierarchy(TypeDescription typeDescription)

Creates a field locator that looks up fields that are declared within a class's class hierarchy.

Parameters
typeDescription:TypeDescription

The type for which to look up a field within its class hierarchy which is also the accessing type.

ForClassHierarchyback to summary
public ForClassHierarchy(TypeDescription typeDescription, TypeDescription accessingType)

Creates a field locator that looks up fields that are declared within a class's class hierarchy.

Parameters
typeDescription:TypeDescription

The type for which to look up a field within its class hierarchy.

accessingType:TypeDescription

The accessing type.

Method Detail

locateback to summary
protected FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.

Parameters
matcher:ElementMatcher<? super FieldDescription>

The matcher that identifies fields of interest.

Returns:FieldList<?>

A list of fields that match the specified matcher.

Annotations
@Override
net.bytebuddy.dynamic.scaffold back to summary

public final Enum FieldLocator.ForClassHierarchy.Factory

extends Enum<FieldLocator.ForClassHierarchy.Factory>
implements Factory
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Factory

A factory for creating a ForClassHierarchy.

Field Summary

Modifier and TypeField and Description
public static final FieldLocator.ForClassHierarchy.Factory
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FieldLocator
make(TypeDescription
The type for which to create a field locator.
typeDescription
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.
public static FieldLocator.ForClassHierarchy.Factory
public static FieldLocator.ForClassHierarchy.Factory[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final FieldLocator.ForClassHierarchy.Factory INSTANCE

The singleton instance.

Constructor Detail

Factoryback to summary
private Factory()

Method Detail

makeback to summary
public FieldLocator make(TypeDescription typeDescription)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.

Parameters
typeDescription:TypeDescription

The type for which to create a field locator.

Returns:FieldLocator

A suitable field locator.

valueOfback to summary
public static FieldLocator.ForClassHierarchy.Factory valueOf(String name)
valuesback to summary
public static FieldLocator.ForClassHierarchy.Factory[] values()
net.bytebuddy.dynamic.scaffold back to summary

public Class FieldLocator.ForExactType

extends AbstractBase
Class Inheritance
Annotations
@Enhance

A field locator that only looks up fields that are declared by a specific type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type for which to look up fields.

Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
accessingType

Constructor Summary

AccessConstructor and Description
public
ForExactType(TypeDescription
The type for which to look up fields that is also providing the accessing type.
typeDescription
)

Creates a new field locator for locating fields from a declared type.

public
ForExactType(TypeDescription
The type for which to look up fields.
typeDescription
,
TypeDescription
The accessing type.
accessingType
)

Creates a new field locator for locating fields from a declared type.

Method Summary

Modifier and TypeMethod and Description
protected FieldList<?>
locate(ElementMatcher<? super FieldDescription>
The matcher that identifies fields of interest.
matcher
)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.
Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
locatelocate

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type for which to look up fields.

Constructor Detail

ForExactTypeback to summary
public ForExactType(TypeDescription typeDescription)

Creates a new field locator for locating fields from a declared type.

Parameters
typeDescription:TypeDescription

The type for which to look up fields that is also providing the accessing type.

ForExactTypeback to summary
public ForExactType(TypeDescription typeDescription, TypeDescription accessingType)

Creates a new field locator for locating fields from a declared type.

Parameters
typeDescription:TypeDescription

The type for which to look up fields.

accessingType:TypeDescription

The accessing type.

Method Detail

locateback to summary
protected FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.

Parameters
matcher:ElementMatcher<? super FieldDescription>

The matcher that identifies fields of interest.

Returns:FieldList<?>

A list of fields that match the specified matcher.

Annotations
@Override
net.bytebuddy.dynamic.scaffold back to summary

public Class FieldLocator.ForExactType.Factory

extends Object
implements Factory
Class Inheritance
  • java.lang.Object
  • net.bytebuddy.dynamic.scaffold.FieldLocator.ForExactType.Factory
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Factory
Annotations
@Enhance

A factory for creating a ForExactType.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type for which to locate a field.

Constructor Summary

AccessConstructor and Description
public
Factory(TypeDescription
The type for which to locate a field.
typeDescription
)

Creates a new factory for a field locator that locates a field for an exact type.

Method Summary

Modifier and TypeMethod and Description
public FieldLocator
make(TypeDescription
The type for which to create a field locator.
typeDescription
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type for which to locate a field.

Constructor Detail

Factoryback to summary
public Factory(TypeDescription typeDescription)

Creates a new factory for a field locator that locates a field for an exact type.

Parameters
typeDescription:TypeDescription

The type for which to locate a field.

Method Detail

makeback to summary
public FieldLocator make(TypeDescription typeDescription)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.

Parameters
typeDescription:TypeDescription

The type for which to create a field locator.

Returns:FieldLocator

A suitable field locator.

net.bytebuddy.dynamic.scaffold back to summary

public Class FieldLocator.ForTopLevelType

extends AbstractBase
Class Inheritance

A field locator that only locates fields in the top-level type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
FieldLocator.ForTopLevelType.Factory

A factory for locating a field in a top-level type.

Field Summary

Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
accessingType

Constructor Summary

AccessConstructor and Description
protected
ForTopLevelType(TypeDescription
The type to access.
typeDescription
)

Creates a new type locator for a top-level type.

Method Summary

Modifier and TypeMethod and Description
protected FieldList<?>
locate(ElementMatcher<? super FieldDescription>
The matcher that identifies fields of interest.
matcher
)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.
Inherited from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase:
locatelocate

Constructor Detail

ForTopLevelTypeback to summary
protected ForTopLevelType(TypeDescription typeDescription)

Creates a new type locator for a top-level type.

Parameters
typeDescription:TypeDescription

The type to access.

Method Detail

locateback to summary
protected FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)

Implements abstract net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.AbstractBase.locate.

Locates fields that match the given matcher.

Parameters
matcher:ElementMatcher<? super FieldDescription>

The matcher that identifies fields of interest.

Returns:FieldList<?>

A list of fields that match the specified matcher.

Annotations
@Override
net.bytebuddy.dynamic.scaffold back to summary

public final Enum FieldLocator.ForTopLevelType.Factory

extends Enum<FieldLocator.ForTopLevelType.Factory>
implements Factory
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Factory

A factory for locating a field in a top-level type.

Field Summary

Modifier and TypeField and Description
public static final FieldLocator.ForTopLevelType.Factory
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FieldLocator
make(TypeDescription
The type for which to create a field locator.
typeDescription
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.
public static FieldLocator.ForTopLevelType.Factory
public static FieldLocator.ForTopLevelType.Factory[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final FieldLocator.ForTopLevelType.Factory INSTANCE

The singleton instance.

Constructor Detail

Factoryback to summary
private Factory()

Method Detail

makeback to summary
public FieldLocator make(TypeDescription typeDescription)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.

Parameters
typeDescription:TypeDescription

The type for which to create a field locator.

Returns:FieldLocator

A suitable field locator.

valueOfback to summary
public static FieldLocator.ForTopLevelType.Factory valueOf(String name)
valuesback to summary
public static FieldLocator.ForTopLevelType.Factory[] values()
net.bytebuddy.dynamic.scaffold back to summary

public final Enum FieldLocator.NoOp

extends Enum<FieldLocator.NoOp>
implements FieldLocator, Factory
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Factory, net.bytebuddy.dynamic.scaffold.FieldLocator

A field locator that never discovers a field.

Field Summary

Modifier and TypeField and Description
public static final FieldLocator.NoOp
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private
NoOp()

Method Summary

Modifier and TypeMethod and Description
public FieldLocator.Resolution
locate(String
The name of the field to locate.
name
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and throws an exception if no such type exists.
public FieldLocator.Resolution
locate(String
The name of the field to locate.
name
,
TypeDescription
The type fo the field to locate.
type
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and type and throws an exception if no such type exists.
public FieldLocator
make(TypeDescription
The type for which to create a field locator.
typeDescription
)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.
public static FieldLocator.NoOp
public static FieldLocator.NoOp[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final FieldLocator.NoOp INSTANCE

The singleton instance.

Constructor Detail

NoOpback to summary
private NoOp()

Method Detail

locateback to summary
public FieldLocator.Resolution locate(String name)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

locateback to summary
public FieldLocator.Resolution locate(String name, TypeDescription type)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.locate.

Locates a field with the given name and type and throws an exception if no such type exists.

Parameters
name:String

The name of the field to locate.

type:TypeDescription

The type fo the field to locate.

Returns:FieldLocator.Resolution

A resolution for a field lookup.

makeback to summary
public FieldLocator make(TypeDescription typeDescription)

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Factory.make.

Creates a field locator for a given type.

Parameters
typeDescription:TypeDescription

The type for which to create a field locator.

Returns:FieldLocator

A suitable field locator.

valueOfback to summary
public static FieldLocator.NoOp valueOf(String name)
valuesback to summary
public static FieldLocator.NoOp[] values()
net.bytebuddy.dynamic.scaffold back to summary

public Interface FieldLocator.Resolution

Known Direct Implementers
net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.Illegal, net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.Simple

A resolution for a field lookup.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
FieldLocator.Resolution.Illegal

An illegal resolution.

public static class
FieldLocator.Resolution.Simple

A simple implementation for a field resolution.

Method Summary

Modifier and TypeMethod and Description
public FieldDescription

Returns:

The located field.
getField
()

Returns the field description if a field was located.

public boolean

Returns:

true if a field was located.
isResolved
()

Returns true if a field was located.

Method Detail

getFieldback to summary
public FieldDescription getField()

Returns the field description if a field was located. This method must only be called if this resolution was actually resolved.

Returns:FieldDescription

The located field.

isResolvedback to summary
public boolean isResolved()

Returns true if a field was located.

Returns:boolean

true if a field was located.

net.bytebuddy.dynamic.scaffold back to summary

public final Enum FieldLocator.Resolution.Illegal

extends Enum<FieldLocator.Resolution.Illegal>
implements Resolution
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution

An illegal resolution.

Field Summary

Modifier and TypeField and Description
public static final FieldLocator.Resolution.Illegal
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FieldDescription
getField()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Returns the field description if a field was located.
public boolean
isResolved()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Returns true if a field was located.
public static FieldLocator.Resolution.Illegal
public static FieldLocator.Resolution.Illegal[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final FieldLocator.Resolution.Illegal INSTANCE

The singleton instance.

Constructor Detail

Illegalback to summary
private Illegal()

Method Detail

getFieldback to summary
public FieldDescription getField()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Returns the field description if a field was located. This method must only be called if this resolution was actually resolved.

Returns:FieldDescription

The located field.

isResolvedback to summary
public boolean isResolved()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Returns true if a field was located.

Returns:boolean

true if a field was located.

valueOfback to summary
public static FieldLocator.Resolution.Illegal valueOf(String name)
valuesback to summary
public static FieldLocator.Resolution.Illegal[] values()
net.bytebuddy.dynamic.scaffold back to summary

public Class FieldLocator.Resolution.Simple

extends Object
implements Resolution
Class Inheritance
  • java.lang.Object
  • net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.Simple
All Implemented Interfaces
net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution
Annotations
@Enhance

A simple implementation for a field resolution.

Field Summary

Modifier and TypeField and Description
private final FieldDescription
fieldDescription

A description of the located field.

Constructor Summary

AccessConstructor and Description
protected
Simple(FieldDescription
A description of the located field.
fieldDescription
)

Creates a new simple resolution for a field.

Method Summary

Modifier and TypeMethod and Description
public FieldDescription
getField()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Returns the field description if a field was located.
public boolean
isResolved()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Returns true if a field was located.
public static FieldLocator.Resolution

Returns:

A resolution for a field locator.
ofBeanAccessor
(FieldLocator
The field locator to use.
fieldLocator
,
MethodDescription
The method description that is the potential accessor.
methodDescription
)

Resolves a field locator for a potential accessor method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldDescriptionback to summary
private final FieldDescription fieldDescription

A description of the located field.

Constructor Detail

Simpleback to summary
protected Simple(FieldDescription fieldDescription)

Creates a new simple resolution for a field.

Parameters
fieldDescription:FieldDescription

A description of the located field.

Method Detail

getFieldback to summary
public FieldDescription getField()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.getField.

Returns the field description if a field was located. This method must only be called if this resolution was actually resolved.

Returns:FieldDescription

The located field.

isResolvedback to summary
public boolean isResolved()

Implements net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Doc from net.bytebuddy.dynamic.scaffold.FieldLocator.Resolution.isResolved.

Returns true if a field was located.

Returns:boolean

true if a field was located.

ofBeanAccessorback to summary
public static FieldLocator.Resolution ofBeanAccessor(FieldLocator fieldLocator, MethodDescription methodDescription)

Resolves a field locator for a potential accessor method. If the provided method is not a bean accessor, an illegal resolution is returned.

Parameters
fieldLocator:FieldLocator

The field locator to use.

methodDescription:MethodDescription

The method description that is the potential accessor.

Returns:FieldLocator.Resolution

A resolution for a field locator.