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

public Interface DynamicType

extends ClassFileLocator
Known Direct Subinterfaces
org.easymock.bytebuddy.dynamic.DynamicType.Unloaded, org.easymock.bytebuddy.dynamic.DynamicType.Loaded
Known Direct Implementers
org.easymock.bytebuddy.dynamic.DynamicType.Default
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, org.easymock.bytebuddy.ClassFileVersion, org.easymock.bytebuddy.asm.AsmVisitorWrapper, org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.annotation.AnnotationDescription, .AnnotationList, .AnnotationValue, org.easymock.bytebuddy.description.field.FieldDescription, org.easymock.bytebuddy.description.method.MethodDescription, .ParameterDescription, .ParameterList, org.easymock.bytebuddy.description.modifier.*, org.easymock.bytebuddy.description.type.*, org.easymock.bytebuddy.dynamic.loading.ClassLoadingStrategy, .InjectionClassLoader, org.easymock.bytebuddy.dynamic.scaffold.*, org.easymock.bytebuddy.implementation.*, org.easymock.bytebuddy.implementation.attribute.*, org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType, org.easymock.bytebuddy.implementation.bytecode.ByteCodeAppender, org.easymock.bytebuddy.matcher.ElementMatcher, .LatentMatcher, org.easymock.bytebuddy.pool.TypePool, org.easymock.bytebuddy.utility.CompoundList, .FileSystem, org.easymock.bytebuddy.utility.nullability.MaybeNull, org.easymock.bytebuddy.utility.visitor.ContextClassVisitor, org.easymock.bytebuddy.jar.asm.ClassVisitor, .Opcodes, java.io.*, java.lang.annotation.Annotation, java.lang.reflect.*, java.util.*, java.util.jar.*

A dynamic type that is created at runtime, usually as the result of applying a org.easymock.bytebuddy.dynamic.DynamicType.Builder or as the result of an org.easymock.bytebuddy.implementation.auxiliary.AuxiliaryType.

 

Note that the TypeDescriptions will represent their unloaded forms and therefore differ from the loaded types, especially with regards to annotations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
DynamicType.Builder<
A loaded type that the built type is guaranteed to be a subclass of.
T
>

A builder for creating a dynamic type.

public static class
DynamicType.Default

A default implementation of a dynamic type.

public static interface
DynamicType.Loaded<
The most specific known loaded type that is implemented by this dynamic type, usually the type itself, an interface or the direct super class.
T
>

A dynamic type that has been loaded into the running instance of the Java virtual machine.

public static interface
DynamicType.Unloaded<
The most specific known loaded type that is implemented by this dynamic type, usually the type itself, an interface or the direct super class.
T
>

A dynamic type that has not yet been loaded by a given java.lang.ClassLoader.

Field Summary

Inherited from org.easymock.bytebuddy.dynamic.ClassFileLocator:
CLASS_FILE_EXTENSION

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
public Map<TypeDescription, byte[]>

Returns:

A mapping from all type descriptions, the actual type and its auxiliary types to their binary representation
getAllTypes
()

Returns all types that are implied by this dynamic type.

public Map<TypeDescription, byte[]>

Returns:

A map of all auxiliary types by their descriptions to their binary representation.
getAuxiliaryTypes
()

Returns a map of all auxiliary types that are required for making use of the main type.

public byte[]

Returns:

A byte array of the type's binary representation.
getBytes
()

Returns a byte array representing this dynamic type.

public Map<TypeDescription, LoadedTypeInitializer>

Returns:

A mapping of all types' descriptions to their loaded type initializers.
getLoadedTypeInitializers
()

Returns a map of all loaded type initializers for the main type and all auxiliary types, if any.

public TypeDescription

Returns:

A description of this dynamic type.
getTypeDescription
()

Returns a description of this dynamic type.

public boolean

Returns:

true if this type requires explicit type initialization.
hasAliveLoadedTypeInitializers
()

Checks if a dynamic type requires some form of explicit type initialization, either for itself or for one of its auxiliary types, if any.

public File

Returns:

The target jar file.
inject
(File
The original jar file.
sourceJar
,
File
The source jar file with the injected contents.
targetJar
)

Injects the types of this dynamic type into a given jar file.

public File

Returns:

The jar file.
inject
(File
The jar file to replace with an injected version.
jar
)

Injects the types of this dynamic type into a given jar file.

public Map<TypeDescription, File>

Returns:

A map of type descriptions pointing to files with their stored binary representations within folder.
saveIn
(File
The base target folder for storing this dynamic type and its auxiliary types, if any.
folder
)

Saves a dynamic type in a given folder using the Java class file format while respecting the naming conventions for saving compiled Java classes.

public File

Returns:

The given file.
toJar
(File
The target file to which the jar is written to.
file
)

Saves the contents of this dynamic type inside a jar file.

public File

Returns:

The given file.
toJar
(File
The target file to which the jar is written to.
file
,
Manifest
The manifest of the created jar.
manifest
)

Saves the contents of this dynamic type inside a jar file.

Inherited from org.easymock.bytebuddy.dynamic.ClassFileLocator:
locate