Top Description Inners Methods
net.bytebuddy.description.field

public Interface FieldList<T extends net.bytebuddy.description.field.FieldDescription>

extends FilterableList<T extends FieldDescription, FieldList<T extends FieldDescription>>
Known Direct Implementers
net.bytebuddy.description.field.FieldList.AbstractBase, net.bytebuddy.description.field.FieldList.Empty
Type Parameters
<T>
The type of field descriptions represented by this list.
Imports
net.bytebuddy.description.ByteCodeElement, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.matcher.ElementMatcher, .FilterableList, java.lang.reflect.Field, java.util.ArrayList, .Arrays, .List

Implementations represent a list of field descriptions.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
FieldList.AbstractBase<
The type of field descriptions represented by this list.
S extends FieldDescription
>

An abstract base implementation of a FieldList.

public static class
FieldList.Empty<
The type of parameter descriptions represented by this list.
S extends FieldDescription
>

An implementation of an empty field list.

public static class
FieldList.Explicit<
The type of field descriptions represented by this list.
S extends FieldDescription
>

A wrapper implementation of a field list for a given list of field descriptions.

public static class
FieldList.ForLoadedFields

An implementation of a field list for an array of loaded fields.

public static class
FieldList.ForTokens

A list of field descriptions for a list of detached tokens.

public static class

Method Summary

Modifier and TypeMethod and Description
public FieldList<FieldDescription.InDefinedShape>

Returns:

A list of fields in their defined shape.
asDefined
()

Returns this list of these field descriptions resolved to their defined shape.

public ByteCodeElement.Token.TokenList<FieldDescription.Token>

Returns:

The transformed token list.
asTokenList
(ElementMatcher<? super TypeDescription>
A matcher that indicates type substitution.
matcher
)

Transforms the list of field descriptions into a list of detached tokens.

Inherited from net.bytebuddy.matcher.FilterableList:
filtergetOnlysubList

Method Detail

asDefinedback to summary
public FieldList<FieldDescription.InDefinedShape> asDefined()

Returns this list of these field descriptions resolved to their defined shape.

Returns:FieldList<FieldDescription.InDefinedShape>

A list of fields in their defined shape.

asTokenListback to summary
public ByteCodeElement.Token.TokenList<FieldDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher)

Transforms the list of field descriptions into a list of detached tokens. All types that are matched by the provided target type matcher are substituted by net.bytebuddy.dynamic.TargetType.

Parameters
matcher:ElementMatcher<? super TypeDescription>

A matcher that indicates type substitution.

Returns:ByteCodeElement.Token.TokenList<FieldDescription.Token>

The transformed token list.

net.bytebuddy.description.field back to summary

public abstract Class FieldList.AbstractBase<S extends net.bytebuddy.description.field.FieldDescription>

extends FilterableList.AbstractBase<S extends FieldDescription, FieldList<S extends FieldDescription>>
implements FieldList<S extends FieldDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.description.field.FieldList, net.bytebuddy.matcher.FilterableList, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable
Known Direct Subclasses
net.bytebuddy.description.field.FieldList.ForLoadedFields, net.bytebuddy.description.field.FieldList.Explicit, net.bytebuddy.description.field.FieldList.ForTokens, net.bytebuddy.description.field.FieldList.TypeSubstituting, net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.WithDecorationOnly.LazyFieldList, net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.FieldTokenList
Type Parameters
<S>
The type of field descriptions represented by this list.

An abstract base implementation of a FieldList.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FieldList<FieldDescription.InDefinedShape>
asDefined()

Implements net.bytebuddy.description.field.FieldList.asDefined.

Returns this list of these field descriptions resolved to their defined shape.
public ByteCodeElement.Token.TokenList<FieldDescription.Token>
asTokenList(ElementMatcher<? super TypeDescription>
A matcher that indicates type substitution.
matcher
)

Implements net.bytebuddy.description.field.FieldList.asTokenList.

Transforms the list of field descriptions into a list of detached tokens.
protected FieldList<S>
wrap(List<S>
The values to wrap in an instance of this list's type.
values
)

Implements abstract net.bytebuddy.matcher.FilterableList.AbstractBase.wrap.

Represents a list of values as an instance of this instance's list type.
Inherited from net.bytebuddy.matcher.FilterableList.AbstractBase:
filtergetOnlysubList

Constructor Detail

AbstractBaseback to summary
public AbstractBase()

Method Detail

asDefinedback to summary
public FieldList<FieldDescription.InDefinedShape> asDefined()

Implements net.bytebuddy.description.field.FieldList.asDefined.

Doc from net.bytebuddy.description.field.FieldList.asDefined.

Returns this list of these field descriptions resolved to their defined shape.

Returns:FieldList<FieldDescription.InDefinedShape>

A list of fields in their defined shape.

asTokenListback to summary
public ByteCodeElement.Token.TokenList<FieldDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher)

Implements net.bytebuddy.description.field.FieldList.asTokenList.

Doc from net.bytebuddy.description.field.FieldList.asTokenList.

Transforms the list of field descriptions into a list of detached tokens. All types that are matched by the provided target type matcher are substituted by net.bytebuddy.dynamic.TargetType.

Parameters
matcher:ElementMatcher<? super TypeDescription>

A matcher that indicates type substitution.

Returns:ByteCodeElement.Token.TokenList<FieldDescription.Token>

The transformed token list.

wrapback to summary
protected FieldList<S> wrap(List<S> values)

Implements abstract net.bytebuddy.matcher.FilterableList.AbstractBase.wrap.

Doc from net.bytebuddy.matcher.FilterableList.AbstractBase.wrap.

Represents a list of values as an instance of this instance's list type.

Parameters
values:List<S>

The values to wrap in an instance of this list's type.

Returns:FieldList<S>

A wrapped instance of the given values.

Annotations
@Override
net.bytebuddy.description.field back to summary

public Class FieldList.Empty<S extends net.bytebuddy.description.field.FieldDescription>

extends FilterableList.Empty<S extends FieldDescription, FieldList<S extends FieldDescription>>
implements FieldList<S extends FieldDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.description.field.FieldList, net.bytebuddy.matcher.FilterableList, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable
Type Parameters
<S>
The type of parameter descriptions represented by this list.

An implementation of an empty field list.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FieldList<FieldDescription.InDefinedShape>
asDefined()

Implements net.bytebuddy.description.field.FieldList.asDefined.

Returns this list of these field descriptions resolved to their defined shape.
public ByteCodeElement.Token.TokenList<FieldDescription.Token>
asTokenList(ElementMatcher<? super TypeDescription>
A matcher that indicates type substitution.
matcher
)

Implements net.bytebuddy.description.field.FieldList.asTokenList.

Transforms the list of field descriptions into a list of detached tokens.
Inherited from net.bytebuddy.matcher.FilterableList.Empty:
filtergetgetOnlysizesubList

Constructor Detail

Emptyback to summary
public Empty()

Method Detail

asDefinedback to summary
public FieldList<FieldDescription.InDefinedShape> asDefined()

Implements net.bytebuddy.description.field.FieldList.asDefined.

Doc from net.bytebuddy.description.field.FieldList.asDefined.

Returns this list of these field descriptions resolved to their defined shape.

Returns:FieldList<FieldDescription.InDefinedShape>

A list of fields in their defined shape.

Annotations
@SuppressWarnings:unchecked
asTokenListback to summary
public ByteCodeElement.Token.TokenList<FieldDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher)

Implements net.bytebuddy.description.field.FieldList.asTokenList.

Doc from net.bytebuddy.description.field.FieldList.asTokenList.

Transforms the list of field descriptions into a list of detached tokens. All types that are matched by the provided target type matcher are substituted by net.bytebuddy.dynamic.TargetType.

Parameters
matcher:ElementMatcher<? super TypeDescription>

A matcher that indicates type substitution.

Returns:ByteCodeElement.Token.TokenList<FieldDescription.Token>

The transformed token list.

net.bytebuddy.description.field back to summary

public Class FieldList.Explicit<S extends net.bytebuddy.description.field.FieldDescription>

extends FieldList.AbstractBase<S extends FieldDescription>
Class Inheritance
Type Parameters
<S>
The type of field descriptions represented by this list.

A wrapper implementation of a field list for a given list of field descriptions.

Field Summary

Modifier and TypeField and Description
private final List<? extends S>
fieldDescriptions

The list of field descriptions this list represents.

Constructor Summary

AccessConstructor and Description
public
Explicit(S...
The list of fields to be represented by this field list.
fieldDescription
)

Creates a new immutable wrapper field list.

public
Explicit(List<? extends S>
The list of fields to be represented by this field list.
fieldDescriptions
)

Creates a new immutable wrapper field list.

Method Summary

Modifier and TypeMethod and Description
public S
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from net.bytebuddy.description.field.FieldList.AbstractBase:
asDefinedasTokenListwrap

Field Detail

fieldDescriptionsback to summary
private final List<? extends S> fieldDescriptions

The list of field descriptions this list represents.

Constructor Detail

Explicitback to summary
public Explicit(S... fieldDescription)

Creates a new immutable wrapper field list.

Parameters
fieldDescription:S[]

The list of fields to be represented by this field list.

Annotations
@SuppressWarnings:unchecked
Explicitback to summary
public Explicit(List<? extends S> fieldDescriptions)

Creates a new immutable wrapper field list.

Parameters
fieldDescriptions:List<? extends S>

The list of fields to be represented by this field list.

Method Detail

getback to summary
public S get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:S

the element at the specified position in this list

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

net.bytebuddy.description.field back to summary

public Class FieldList.ForLoadedFields

extends FieldList.AbstractBase<FieldDescription.InDefinedShape>
Class Inheritance

An implementation of a field list for an array of loaded fields.

Field Summary

Modifier and TypeField and Description
private final List<? extends Field>
fields

The loaded fields this field list represents.

Constructor Summary

AccessConstructor and Description
public
ForLoadedFields(Field...
An array of fields to be represented by this field list.
field
)

Creates a new immutable field list that represents an array of loaded field.

public
ForLoadedFields(List<? extends Field>
An array of fields to be represented by this field list.
fields
)

Creates a new immutable field list that represents an array of loaded field.

Method Summary

Modifier and TypeMethod and Description
public FieldDescription.InDefinedShape
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from net.bytebuddy.description.field.FieldList.AbstractBase:
asDefinedasTokenListwrap

Field Detail

fieldsback to summary
private final List<? extends Field> fields

The loaded fields this field list represents.

Constructor Detail

ForLoadedFieldsback to summary
public ForLoadedFields(Field... field)

Creates a new immutable field list that represents an array of loaded field.

Parameters
field:Field[]

An array of fields to be represented by this field list.

ForLoadedFieldsback to summary
public ForLoadedFields(List<? extends Field> fields)

Creates a new immutable field list that represents an array of loaded field.

Parameters
fields:List<? extends Field>

An array of fields to be represented by this field list.

Method Detail

getback to summary
public FieldDescription.InDefinedShape get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:FieldDescription.InDefinedShape

the element at the specified position in this list

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

net.bytebuddy.description.field back to summary

public Class FieldList.ForTokens

extends FieldList.AbstractBase<FieldDescription.InDefinedShape>
Class Inheritance

A list of field descriptions for a list of detached tokens. For the returned fields, each token is attached to its field representation.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
declaringType

The declaring type of the represented fields.

private final List<? extends FieldDescription.Token>
tokens

A list of the represented fields' tokens.

Constructor Summary

AccessConstructor and Description
public
ForTokens(TypeDescription
The declaring type of the represented fields.
declaringType
,
FieldDescription.Token...
A list of the represented fields' tokens.
token
)

Creates a new field list from a list of field tokens.

public
ForTokens(TypeDescription
The declaring type of the represented fields.
declaringType
,
List<? extends FieldDescription.Token>
A list of the represented fields' tokens.
tokens
)

Creates a new field list from a list of field tokens.

Method Summary

Modifier and TypeMethod and Description
public FieldDescription.InDefinedShape
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from net.bytebuddy.description.field.FieldList.AbstractBase:
asDefinedasTokenListwrap

Field Detail

declaringTypeback to summary
private final TypeDescription declaringType

The declaring type of the represented fields.

tokensback to summary
private final List<? extends FieldDescription.Token> tokens

A list of the represented fields' tokens.

Constructor Detail

ForTokensback to summary
public ForTokens(TypeDescription declaringType, FieldDescription.Token... token)

Creates a new field list from a list of field tokens.

Parameters
declaringType:TypeDescription

The declaring type of the represented fields.

token:FieldDescription.Token[]

A list of the represented fields' tokens.

ForTokensback to summary
public ForTokens(TypeDescription declaringType, List<? extends FieldDescription.Token> tokens)

Creates a new field list from a list of field tokens.

Parameters
declaringType:TypeDescription

The declaring type of the represented fields.

tokens:List<? extends FieldDescription.Token>

A list of the represented fields' tokens.

Method Detail

getback to summary
public FieldDescription.InDefinedShape get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:FieldDescription.InDefinedShape

the element at the specified position in this list

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

net.bytebuddy.description.field back to summary

public Class FieldList.TypeSubstituting

extends FieldList.AbstractBase<FieldDescription.InGenericShape>
Class Inheritance

A list of field descriptions that yields net.bytebuddy.description.field.FieldDescription.TypeSubstituting.

Field Summary

Modifier and TypeField and Description
private final TypeDescription.Generic
declaringType

The field's actual declaring type.

private final List<? extends FieldDescription>
fieldDescriptions

The field descriptions to be transformed.

private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>
visitor

The visitor to apply to a field description.

Constructor Summary

AccessConstructor and Description
public
TypeSubstituting(TypeDescription.Generic
The field's actual declaring type.
declaringType
,
List<? extends FieldDescription>
The field descriptions to be transformed.
fieldDescriptions
,
TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>
The visitor to apply to a field description.
visitor
)

Creates a new type substituting field list.

Method Summary

Modifier and TypeMethod and Description
public FieldDescription.InGenericShape
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from net.bytebuddy.description.field.FieldList.AbstractBase:
asDefinedasTokenListwrap

Field Detail

declaringTypeback to summary
private final TypeDescription.Generic declaringType

The field's actual declaring type.

fieldDescriptionsback to summary
private final List<? extends FieldDescription> fieldDescriptions

The field descriptions to be transformed.

visitorback to summary
private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor

The visitor to apply to a field description.

Constructor Detail

TypeSubstitutingback to summary
public TypeSubstituting(TypeDescription.Generic declaringType, List<? extends FieldDescription> fieldDescriptions, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)

Creates a new type substituting field list.

Parameters
declaringType:TypeDescription.Generic

The field's actual declaring type.

fieldDescriptions:List<? extends FieldDescription>

The field descriptions to be transformed.

visitor:TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>

The visitor to apply to a field description.

Method Detail

getback to summary
public FieldDescription.InGenericShape get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:FieldDescription.InGenericShape

the element at the specified position in this list

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list