Top Description Inners Methods
org.easymock.bytebuddy.dynamic.scaffold

public Interface RecordComponentRegistry

Known Direct Implementers
org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.type.RecordComponentDescription, .TypeDescription, org.easymock.bytebuddy.dynamic.Transformer, org.easymock.bytebuddy.implementation.attribute.RecordComponentAttributeAppender, org.easymock.bytebuddy.matcher.ElementMatcher, .LatentMatcher, org.easymock.bytebuddy.utility.nullability.MaybeNull, java.util.*

A record component registry represents an extendable collection of record components which are identified by their names that are mapped to a given RecordComponentAttributeAppender. Record components can be uniquely identified by their name for a given type since record components are never inherited.

 

This registry is the counterpart of a MethodRegistry. However, a record component registry is implemented simpler since it does not have to deal with complex signatures or inheritance. For the sake of consistency, the record component registry follows however a similar pattern without introducing unnecessary complexity.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
RecordComponentRegistry.Compiled

Represents a compiled record component registry.

public static class
RecordComponentRegistry.Default

An immutable default implementation of a record component registry.

Method Summary

Modifier and TypeMethod and Description
public RecordComponentRegistry.Compiled

Returns:

A prepared record component registry.
compile
(TypeDescription
The instrumented type.
instrumentedType
)

Prepares the record component registry for a given instrumented type.

public RecordComponentRegistry

Returns:

An adapted version of this method registry.
prepend
(LatentMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns.
matcher
,
RecordComponentAttributeAppender.Factory
The record component attribute appender factory to apply on any matched record component.
recordComponentAttributeAppenderFactory
,
Transformer<RecordComponentDescription>
The record component transformer to apply to any matched record component.
transformer
)

Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.

Method Detail

compileback to summary
public RecordComponentRegistry.Compiled compile(TypeDescription instrumentedType)

Prepares the record component registry for a given instrumented type.

Parameters
instrumentedType:TypeDescription

The instrumented type.

Returns:RecordComponentRegistry.Compiled

A prepared record component registry.

prependback to summary
public RecordComponentRegistry prepend(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer)

Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.

Parameters
matcher:LatentMatcher<? super RecordComponentDescription>

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppenderFactory:RecordComponentAttributeAppender.Factory

The record component attribute appender factory to apply on any matched record component.

transformer:Transformer<RecordComponentDescription>

The record component transformer to apply to any matched record component.

Returns:RecordComponentRegistry

An adapted version of this method registry.

org.easymock.bytebuddy.dynamic.scaffold back to summary

public Interface RecordComponentRegistry.Compiled

extends RecordComponentPool
Known Direct Implementers
org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Compiled.NoOp, org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Compiled

Represents a compiled record component registry.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
RecordComponentRegistry.Compiled.NoOp

A no-op record component registry that does not register annotations for any record component.

Method Summary

Inherited from org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool:
target
org.easymock.bytebuddy.dynamic.scaffold back to summary

public final Enum RecordComponentRegistry.Compiled.NoOp

extends Enum<RecordComponentRegistry.Compiled.NoOp>
implements Compiled
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Compiled, org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool

A no-op record component registry that does not register annotations for any record component.

Field Summary

Modifier and TypeField and Description
public static final RecordComponentRegistry.Compiled.NoOp
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private
NoOp()

Method Summary

Modifier and TypeMethod and Description
public TypeWriter.RecordComponentPool.Record
target(RecordComponentDescription
The record component being processed.
recordComponentDescription
)

Implements org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Looks up a handler entry for a given record component.
public static RecordComponentRegistry.Compiled.NoOp
public static RecordComponentRegistry.Compiled.NoOp[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final RecordComponentRegistry.Compiled.NoOp INSTANCE

The singleton instance.

Constructor Detail

NoOpback to summary
private NoOp()

Method Detail

targetback to summary
public TypeWriter.RecordComponentPool.Record target(RecordComponentDescription recordComponentDescription)

Implements org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Doc from org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Looks up a handler entry for a given record component.

Parameters
recordComponentDescription:RecordComponentDescription

The record component being processed.

Returns:TypeWriter.RecordComponentPool.Record

A handler entry for the given record component.

valueOfback to summary
public static RecordComponentRegistry.Compiled.NoOp valueOf(String name)
valuesback to summary
public static RecordComponentRegistry.Compiled.NoOp[] values()
org.easymock.bytebuddy.dynamic.scaffold back to summary

public Class RecordComponentRegistry.Default

extends Object
implements RecordComponentRegistry
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default
All Implemented Interfaces
org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry
Annotations
@Enhance

An immutable default implementation of a record component registry.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
RecordComponentRegistry.Default.Compiled

A compiled default record component registry.

protected static class
RecordComponentRegistry.Default.Entry

An entry of the default record component registry.

Field Summary

Modifier and TypeField and Description
private final List<RecordComponentRegistry.Default.Entry>
entries

This registries entries.

Constructor Summary

AccessConstructor and Description
public
Default()

Creates a new empty default record component registry.

private
Default(List<RecordComponentRegistry.Default.Entry>
The entries of the record component registry.
entries
)

Creates a new default record component registry.

Method Summary

Modifier and TypeMethod and Description
public RecordComponentRegistry.Compiled
compile(TypeDescription
The instrumented type.
instrumentedType
)

Implements org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.compile.

Prepares the record component registry for a given instrumented type.
public RecordComponentRegistry
prepend(LatentMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns.
matcher
,
RecordComponentAttributeAppender.Factory
The record component attribute appender factory to apply on any matched record component.
recordComponentAttributeAppenderFactory
,
Transformer<RecordComponentDescription>
The record component transformer to apply to any matched record component.
transformer
)

Implements org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.prepend.

Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entriesback to summary
private final List<RecordComponentRegistry.Default.Entry> entries

This registries entries.

Constructor Detail

Defaultback to summary
public Default()

Creates a new empty default record component registry.

Defaultback to summary
private Default(List<RecordComponentRegistry.Default.Entry> entries)

Creates a new default record component registry.

Parameters
entries:List<RecordComponentRegistry.Default.Entry>

The entries of the record component registry.

Method Detail

compileback to summary
public RecordComponentRegistry.Compiled compile(TypeDescription instrumentedType)

Implements org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.compile.

Doc from org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.compile.

Prepares the record component registry for a given instrumented type.

Parameters
instrumentedType:TypeDescription

The instrumented type.

Returns:RecordComponentRegistry.Compiled

A prepared record component registry.

prependback to summary
public RecordComponentRegistry prepend(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer)

Implements org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.prepend.

Doc from org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.prepend.

Prepends the given record component definition to this record component registry, i.e. this configuration is applied first.

Parameters
matcher:LatentMatcher<? super RecordComponentDescription>

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppenderFactory:RecordComponentAttributeAppender.Factory

The record component attribute appender factory to apply on any matched record component.

transformer:Transformer<RecordComponentDescription>

The record component transformer to apply to any matched record component.

Returns:RecordComponentRegistry

An adapted version of this method registry.

org.easymock.bytebuddy.dynamic.scaffold back to summary

protected Class RecordComponentRegistry.Default.Compiled

extends Object
implements Compiled
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Compiled
All Implemented Interfaces
org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Compiled, org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool
Annotations
@Enhance

A compiled default record component registry.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
RecordComponentRegistry.Default.Compiled.Entry

An entry of a compiled record component registry.

Field Summary

Modifier and TypeField and Description
private final List<RecordComponentRegistry.Default.Compiled.Entry>
entries

The entries of this compiled record component registry.

private final TypeDescription
instrumentedType

The instrumented type for which this registry was compiled for.

Constructor Summary

AccessConstructor and Description
protected
Compiled(TypeDescription
The instrumented type for which this registry was compiled for.
instrumentedType
,
List<RecordComponentRegistry.Default.Compiled.Entry>
The entries of this compiled record component registry.
entries
)

Creates a new compiled record component registry.

Method Summary

Modifier and TypeMethod and Description
public TypeWriter.RecordComponentPool.Record
target(RecordComponentDescription
The record component being processed.
recordComponentDescription
)

Implements org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Looks up a handler entry for a given record component.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entriesback to summary
private final List<RecordComponentRegistry.Default.Compiled.Entry> entries

The entries of this compiled record component registry.

instrumentedTypeback to summary
private final TypeDescription instrumentedType

The instrumented type for which this registry was compiled for.

Constructor Detail

Compiledback to summary
protected Compiled(TypeDescription instrumentedType, List<RecordComponentRegistry.Default.Compiled.Entry> entries)

Creates a new compiled record component registry.

Parameters
instrumentedType:TypeDescription

The instrumented type for which this registry was compiled for.

entries:List<RecordComponentRegistry.Default.Compiled.Entry>

The entries of this compiled record component registry.

Method Detail

targetback to summary
public TypeWriter.RecordComponentPool.Record target(RecordComponentDescription recordComponentDescription)

Implements org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Doc from org.easymock.bytebuddy.dynamic.scaffold.TypeWriter.RecordComponentPool.target.

Looks up a handler entry for a given record component.

Parameters
recordComponentDescription:RecordComponentDescription

The record component being processed.

Returns:TypeWriter.RecordComponentPool.Record

A handler entry for the given record component.

org.easymock.bytebuddy.dynamic.scaffold back to summary

protected Class RecordComponentRegistry.Default.Compiled.Entry

extends Object
implements ElementMatcher<RecordComponentDescription>
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Compiled.Entry
All Implemented Interfaces
org.easymock.bytebuddy.matcher.ElementMatcher
Annotations
@Enhance

An entry of a compiled record component registry.

Field Summary

Modifier and TypeField and Description
private final ElementMatcher<? super RecordComponentDescription>
matcher

The matcher to identify any record component that this definition concerns.

private final RecordComponentAttributeAppender
recordComponentAttributeAppender

The record component attribute appender to apply on any matched record component.

private final Transformer<RecordComponentDescription>
transformer

The record component transformer to apply to any matched record component.

Constructor Summary

AccessConstructor and Description
protected
Entry(ElementMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns.
matcher
,
RecordComponentAttributeAppender
The record component attribute appender to apply on any matched record component.
recordComponentAttributeAppender
,
Transformer<RecordComponentDescription>
The record component transformer to apply to any matched record component.
transformer
)

Creates a new entry.

Method Summary

Modifier and TypeMethod and Description
protected TypeWriter.RecordComponentPool.Record

Returns:

A record representing the binding of this entry to the provided record component.
bind
(TypeDescription
The instrumented type for which this entry applies.
instrumentedType
,
RecordComponentDescription
The record component description to be bound to this entry.
recordComponentDescription
)

Binds this entry to the provided record component description.

public boolean
matches(RecordComponentDescription
The instance to be matched or null.
target
)

Implements org.easymock.bytebuddy.matcher.ElementMatcher.matches.

Matches a target against this element matcher.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matcherback to summary
private final ElementMatcher<? super RecordComponentDescription> matcher

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppenderback to summary
private final RecordComponentAttributeAppender recordComponentAttributeAppender

The record component attribute appender to apply on any matched record component.

transformerback to summary
private final Transformer<RecordComponentDescription> transformer

The record component transformer to apply to any matched record component.

Constructor Detail

Entryback to summary
protected Entry(ElementMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer)

Creates a new entry.

Parameters
matcher:ElementMatcher<? super RecordComponentDescription>

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppender:RecordComponentAttributeAppender

The record component attribute appender to apply on any matched record component.

transformer:Transformer<RecordComponentDescription>

The record component transformer to apply to any matched record component.

Method Detail

bindback to summary
protected TypeWriter.RecordComponentPool.Record bind(TypeDescription instrumentedType, RecordComponentDescription recordComponentDescription)

Binds this entry to the provided record component description.

Parameters
instrumentedType:TypeDescription

The instrumented type for which this entry applies.

recordComponentDescription:RecordComponentDescription

The record component description to be bound to this entry.

Returns:TypeWriter.RecordComponentPool.Record

A record representing the binding of this entry to the provided record component.

matchesback to summary
public boolean matches(RecordComponentDescription target)

Implements org.easymock.bytebuddy.matcher.ElementMatcher.matches.

Doc from org.easymock.bytebuddy.matcher.ElementMatcher.matches.

Matches a target against this element matcher.

Parameters
target:RecordComponentDescription

The instance to be matched or null.

Returns:boolean

true if the given element is matched by this matcher or false otherwise.

org.easymock.bytebuddy.dynamic.scaffold back to summary

protected Class RecordComponentRegistry.Default.Entry

extends Object
implements LatentMatcher<RecordComponentDescription>
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Entry
All Implemented Interfaces
org.easymock.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance

An entry of the default record component registry.

Field Summary

Modifier and TypeField and Description
private final LatentMatcher<? super RecordComponentDescription>
matcher

The matcher to identify any record component that this definition concerns.

private final RecordComponentAttributeAppender.Factory
recordComponentAttributeAppender

The record component attribute appender factory to apply on any matched record component.

private final Transformer<RecordComponentDescription>
transformer

The record component transformer to apply to any matched record component.

Constructor Summary

AccessConstructor and Description
protected
Entry(LatentMatcher<? super RecordComponentDescription>
The matcher to identify any record component that this definition concerns.
matcher
,
RecordComponentAttributeAppender.Factory
The record component attribute appender factory to apply on any matched record component.
recordComponentAttributeAppender
,
Transformer<RecordComponentDescription>
The record component transformer to apply to any matched record component.
transformer
)

Creates a new entry.

Method Summary

Modifier and TypeMethod and Description
protected RecordComponentAttributeAppender.Factory

Returns:

The record component attribute appender factory to apply on any matched record component.
getRecordComponentAttributeAppender
()

Returns the record component attribute appender factory to apply on any matched record component.

protected Transformer<RecordComponentDescription>

Returns:

The record component transformer to apply to any matched record component.
getTransformer
()

Returns the record component transformer to apply to any matched record component.

public ElementMatcher<? super RecordComponentDescription>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements org.easymock.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matcherback to summary
private final LatentMatcher<? super RecordComponentDescription> matcher

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppenderback to summary
private final RecordComponentAttributeAppender.Factory recordComponentAttributeAppender

The record component attribute appender factory to apply on any matched record component.

transformerback to summary
private final Transformer<RecordComponentDescription> transformer

The record component transformer to apply to any matched record component.

Constructor Detail

Entryback to summary
protected Entry(LatentMatcher<? super RecordComponentDescription> matcher, RecordComponentAttributeAppender.Factory recordComponentAttributeAppender, Transformer<RecordComponentDescription> transformer)

Creates a new entry.

Parameters
matcher:LatentMatcher<? super RecordComponentDescription>

The matcher to identify any record component that this definition concerns.

recordComponentAttributeAppender:RecordComponentAttributeAppender.Factory

The record component attribute appender factory to apply on any matched record component.

transformer:Transformer<RecordComponentDescription>

The record component transformer to apply to any matched record component.

Method Detail

getRecordComponentAttributeAppenderback to summary
protected RecordComponentAttributeAppender.Factory getRecordComponentAttributeAppender()

Returns the record component attribute appender factory to apply on any matched record component.

Returns:RecordComponentAttributeAppender.Factory

The record component attribute appender factory to apply on any matched record component.

getTransformerback to summary
protected Transformer<RecordComponentDescription> getTransformer()

Returns the record component transformer to apply to any matched record component.

Returns:Transformer<RecordComponentDescription>

The record component transformer to apply to any matched record component.

resolveback to summary
public ElementMatcher<? super RecordComponentDescription> resolve(TypeDescription typeDescription)

Implements org.easymock.bytebuddy.matcher.LatentMatcher.resolve.

Doc from org.easymock.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super RecordComponentDescription>

An ElementMatcher that represents this matcher's resolved form.