Top Description Inners Fields Methods
org.easymock.bytebuddy.implementation.auxiliary

public Interface AuxiliaryType

Known Direct Implementers
org.easymock.bytebuddy.implementation.auxiliary.MethodCallProxy, org.easymock.bytebuddy.implementation.auxiliary.PrivilegedMemberLookupAction, org.easymock.bytebuddy.implementation.auxiliary.TrivialType, org.easymock.bytebuddy.implementation.auxiliary.TypeProxy, org.easymock.bytebuddy.implementation.bind.annotation.FieldProxy.Binder.AccessorProxy, org.easymock.bytebuddy.implementation.bind.annotation.Morph.Binder.RedirectionProxy, org.easymock.bytebuddy.implementation.bind.annotation.Pipe.Binder.RedirectionProxy
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, org.easymock.bytebuddy.ClassFileVersion, org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.modifier.ModifierContributor, .SyntheticState, org.easymock.bytebuddy.description.type.TypeDescription, org.easymock.bytebuddy.dynamic.DynamicType, org.easymock.bytebuddy.implementation.MethodAccessorFactory, org.easymock.bytebuddy.utility.RandomString, java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

An auxiliary type that provides services to the instrumentation of another type. Implementations should provide meaningful equals(Object) and hashCode() implementations in order to avoid multiple creations of this type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
AuxiliaryType.NamingStrategy

Representation of a naming strategy for an auxiliary type.

public static @interface
AuxiliaryType.SignatureRelevant

A marker to indicate that an auxiliary type is part of the instrumented types signature.

Field Summary

Modifier and TypeField and Description
public static final ModifierContributor.ForType[]
DEFAULT_TYPE_MODIFIER

The default type access of an auxiliary type.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The suffix for this auxiliary type.
getSuffix
()

Produces a suffix that gives this auxiliary type a stable name.

public DynamicType

Returns:

A dynamically created type representing this auxiliary type.
make
(String
The fully qualified binary name for this auxiliary type. The type should be in the same package than the instrumented type this auxiliary type is providing services to in order to allow package-private access.
auxiliaryTypeName
,
ClassFileVersion
The class file version the auxiliary class should be written in.
classFileVersion
,
MethodAccessorFactory
A factory for accessor methods.
methodAccessorFactory
)

Creates a new auxiliary type.

Field Detail

DEFAULT_TYPE_MODIFIERback to summary
public static final ModifierContributor.ForType[] DEFAULT_TYPE_MODIFIER

The default type access of an auxiliary type. This array must not be mutated.

Annotations
@SuppressFBWarnings:MS_MUTABLE_ARRAY, MS_OOI_PKGPROTECT
justification:The array is not modified by class contract.

Method Detail

getSuffixback to summary
public String getSuffix()

Produces a suffix that gives this auxiliary type a stable name. A best effort is made that this suffix is unique.

Returns:String

The suffix for this auxiliary type.

makeback to summary
public DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)

Creates a new auxiliary type.

Parameters
auxiliaryTypeName:String

The fully qualified binary name for this auxiliary type. The type should be in the same package than the instrumented type this auxiliary type is providing services to in order to allow package-private access.

classFileVersion:ClassFileVersion

The class file version the auxiliary class should be written in.

methodAccessorFactory:MethodAccessorFactory

A factory for accessor methods.

Returns:DynamicType

A dynamically created type representing this auxiliary type.

org.easymock.bytebuddy.implementation.auxiliary back to summary

public Interface AuxiliaryType.NamingStrategy

Known Direct Implementers
org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.Enumerating, org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.Suffixing, org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.SuffixingRandom

Representation of a naming strategy for an auxiliary type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
AuxiliaryType.NamingStrategy.Enumerating

A naming strategy for an auxiliary type which attempts an enumeration of types by using the hash code of the instrumenting instance.

public static class
AuxiliaryType.NamingStrategy.Suffixing

Creates a naming strategy that uses stable suffixes that are provided by the auxiliary types themselves.

public static class
AuxiliaryType.NamingStrategy.SuffixingRandom

A naming strategy for an auxiliary type which returns the instrumented type's name with a fixed extension and a random number as a suffix.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The fully qualified name for the given auxiliary type.
name
(TypeDescription
The instrumented type for which an auxiliary type is registered.
instrumentedType
,
AuxiliaryType
The named auxiliary type.
auxiliaryType
)

Names an auxiliary type.

Method Detail

nameback to summary
public String name(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)

Names an auxiliary type.

Parameters
instrumentedType:TypeDescription

The instrumented type for which an auxiliary type is registered.

auxiliaryType:AuxiliaryType

The named auxiliary type.

Returns:String

The fully qualified name for the given auxiliary type.

org.easymock.bytebuddy.implementation.auxiliary back to summary

public Class AuxiliaryType.NamingStrategy.Enumerating

extends Object
implements NamingStrategy
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.Enumerating
All Implemented Interfaces
org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy

A naming strategy for an auxiliary type which attempts an enumeration of types by using the hash code of the instrumenting instance.

Field Summary

Modifier and TypeField and Description
private final String
suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Summary

AccessConstructor and Description
public
Enumerating(String
The suffix to extend to the instrumented type.
suffix
)

Creates a new suffixing random naming strategy.

Method Summary

Modifier and TypeMethod and Description
public String
name(TypeDescription
The instrumented type for which an auxiliary type is registered.
instrumentedType
,
AuxiliaryType
The named auxiliary type.
auxiliaryType
)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

suffixback to summary
private final String suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Detail

Enumeratingback to summary
public Enumerating(String suffix)

Creates a new suffixing random naming strategy.

Parameters
suffix:String

The suffix to extend to the instrumented type.

Method Detail

nameback to summary
public String name(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Doc from org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.

Parameters
instrumentedType:TypeDescription

The instrumented type for which an auxiliary type is registered.

auxiliaryType:AuxiliaryType

The named auxiliary type.

Returns:String

The fully qualified name for the given auxiliary type.

org.easymock.bytebuddy.implementation.auxiliary back to summary

public Class AuxiliaryType.NamingStrategy.Suffixing

extends Object
implements NamingStrategy
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.Suffixing
All Implemented Interfaces
org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy

Creates a naming strategy that uses stable suffixes that are provided by the auxiliary types themselves.

Field Summary

Modifier and TypeField and Description
private final String
suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Summary

AccessConstructor and Description
public
Suffixing(String
The suffix to extend to the instrumented type.
suffix
)

Creates a new suffixing random naming strategy.

Method Summary

Modifier and TypeMethod and Description
public String
name(TypeDescription
The instrumented type for which an auxiliary type is registered.
instrumentedType
,
AuxiliaryType
The named auxiliary type.
auxiliaryType
)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

suffixback to summary
private final String suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Detail

Suffixingback to summary
public Suffixing(String suffix)

Creates a new suffixing random naming strategy.

Parameters
suffix:String

The suffix to extend to the instrumented type.

Method Detail

nameback to summary
public String name(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Doc from org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.

Parameters
instrumentedType:TypeDescription

The instrumented type for which an auxiliary type is registered.

auxiliaryType:AuxiliaryType

The named auxiliary type.

Returns:String

The fully qualified name for the given auxiliary type.

org.easymock.bytebuddy.implementation.auxiliary back to summary

public Class AuxiliaryType.NamingStrategy.SuffixingRandom

extends Object
implements NamingStrategy
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.SuffixingRandom
All Implemented Interfaces
org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy
Annotations
@Enhance

A naming strategy for an auxiliary type which returns the instrumented type's name with a fixed extension and a random number as a suffix. All generated names will be in the same package as the instrumented type.

Field Summary

Modifier and TypeField and Description
private final RandomString
randomString

An instance for creating random values.

private final String
suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Summary

AccessConstructor and Description
public
SuffixingRandom(String
The suffix to extend to the instrumented type.
suffix
)

Creates a new suffixing random naming strategy.

Method Summary

Modifier and TypeMethod and Description
public String
name(TypeDescription
The instrumented type for which an auxiliary type is registered.
instrumentedType
,
AuxiliaryType
The named auxiliary type.
auxiliaryType
)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

randomStringback to summary
private final RandomString randomString

An instance for creating random values.

Annotations
@ValueHandling:IGNORE
suffixback to summary
private final String suffix

The suffix to append to the instrumented type for creating names for the auxiliary types.

Constructor Detail

SuffixingRandomback to summary
public SuffixingRandom(String suffix)

Creates a new suffixing random naming strategy.

Parameters
suffix:String

The suffix to extend to the instrumented type.

Method Detail

nameback to summary
public String name(TypeDescription instrumentedType, AuxiliaryType auxiliaryType)

Implements org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Doc from org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.NamingStrategy.name.

Names an auxiliary type.

Parameters
instrumentedType:TypeDescription

The instrumented type for which an auxiliary type is registered.

auxiliaryType:AuxiliaryType

The named auxiliary type.

Returns:String

The fully qualified name for the given auxiliary type.

org.easymock.bytebuddy.implementation.auxiliary back to summary

public @Interface AuxiliaryType.SignatureRelevant

extends Annotation
Annotations
@Retention:CLASS
@Target:TYPE

A marker to indicate that an auxiliary type is part of the instrumented types signature. This information can be used to load a type before the instrumented type such that reflection on the instrumented type does not cause a NoClassDefFoundError.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString