| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | EnhancerImpl.EnhancementStatus
Attempt to keep track of which interfaces are being applied, so to attempt dodging the performance implications of for https://bugs.openjdk.org/browse/JDK-8180450 We're optimising for the case in which entities are fully enhanced. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Advice | |
| private final ClassFileLocator | adviceLocator
Extract the following constants so that enhancement on large projects can be done efficiently: otherwise each instance use will trigger a resource load on the ClassLoader tree, triggering allocation of several streams to unzip each JAR file each time. |
| private final ByteBuddyState | |
| private final EnhancerImpl. | |
| protected final ByteBuddyEnhancementContext | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private final Implementation | |
| private static final CoreMessageLogger | |
| private static final AnnotationDescription | |
| private final TypePool |
| Access | Constructor and Description |
|---|---|
| public | EnhancerImpl(final EnhancementContext
Describes the context in which enhancement will occur so as to give access
to contextual/environmental information. enhancementContext, final ByteBuddyState refers to the ByteBuddy instance to use byteBuddyState)Constructs the Enhancer, using the given context. |
| Modifier and Type | Method and Description |
|---|---|
| private static DynamicType. | addFieldWithGetterAndSetter(DynamicType.
|
| private DynamicType. | addInterceptorHandling(DynamicType.
|
| private boolean | |
| private TypePool | |
| pack-priv static String | |
| private List | |
| private Collection | |
| private PersistentAttributeTransformer | |
| private DynamicType. | |
| public byte[] | Returns: The enhanced bytecode. Could be the same as the original bytecode if the original was already enhanced or we could not enhance it for some reason.The name of the class whose bytecode is being enhanced. className, byte[] The class's original (pre-enhancement) byte code originalBytes)Implements org. |
| adviceInitializeLazyAttributeLoadingInterceptor | back to summary |
|---|---|
| private final Advice adviceInitializeLazyAttributeLoadingInterceptor | |
| adviceLocator | back to summary |
|---|---|
| private final ClassFileLocator adviceLocator Extract the following constants so that enhancement on large projects can be done efficiently: otherwise each instance use will trigger a resource load on the ClassLoader tree, triggering allocation of several streams to unzip each JAR file each time. | |
| byteBuddyState | back to summary |
|---|---|
| private final ByteBuddyState byteBuddyState | |
| classFileLocator | back to summary |
|---|---|
| private final EnhancerImpl. | |
| enhancementContext | back to summary |
|---|---|
| protected final ByteBuddyEnhancementContext enhancementContext | |
| implementationAreFieldsDirty | back to summary |
|---|---|
| private final Implementation implementationAreFieldsDirty | |
| implementationAreFieldsDirtyWithoutCollections | back to summary |
|---|---|
| private final Implementation implementationAreFieldsDirtyWithoutCollections | |
| implementationClearDirtyAttributes | back to summary |
|---|---|
| private final Implementation implementationClearDirtyAttributes | |
| implementationClearDirtyAttributesWithoutCollections | back to summary |
|---|---|
| private final Implementation implementationClearDirtyAttributesWithoutCollections | |
| implementationClearOwner | back to summary |
|---|---|
| private final Implementation implementationClearOwner | |
| implementationGetCollectionTrackerWithoutCollections | back to summary |
|---|---|
| private final Implementation implementationGetCollectionTrackerWithoutCollections | |
| implementationGetDirtyAttributes | back to summary |
|---|---|
| private final Implementation implementationGetDirtyAttributes | |
| implementationGetDirtyAttributesWithoutCollections | back to summary |
|---|---|
| private final Implementation implementationGetDirtyAttributesWithoutCollections | |
| implementationSetOwner | back to summary |
|---|---|
| private final Implementation implementationSetOwner | |
| implementationSuspendDirtyTracking | back to summary |
|---|---|
| private final Implementation implementationSuspendDirtyTracking | |
| implementationTrackChange | back to summary |
|---|---|
| private final Implementation implementationTrackChange | |
| log | back to summary |
|---|---|
| private static final CoreMessageLogger log | |
| TRANSIENT_ANNOTATION | back to summary |
|---|---|
| private static final AnnotationDescription TRANSIENT_ANNOTATION | |
| typePool | back to summary |
|---|---|
| private final TypePool typePool | |
| EnhancerImpl | back to summary |
|---|---|
| public EnhancerImpl(final EnhancementContext enhancementContext, final ByteBuddyState byteBuddyState) Constructs the Enhancer, using the given context.
| |
| addFieldWithGetterAndSetter | back to summary |
|---|---|
| private static DynamicType. | |
| addInterceptorHandling | back to summary |
|---|---|
| private DynamicType. | |
| alreadyEnhanced | back to summary |
|---|---|
| private boolean alreadyEnhanced(TypeDescription managedCtClass) | |
| buildTypePool | back to summary |
|---|---|
| private TypePool buildTypePool(final ClassFileLocator classFileLocator) | |
| capitalize | back to summary |
|---|---|
| pack-priv static String capitalize(String value) | |
| collectCollectionFields | back to summary |
|---|---|
| private List | |
| collectInheritCollectionFields | back to summary |
|---|---|
| private Collection | |
| createTransformer | back to summary |
|---|---|
| private PersistentAttributeTransformer createTransformer(TypeDescription typeDescription) | |
| doEnhance | back to summary |
|---|---|
| private DynamicType. | |
| enhance | back to summary |
|---|---|
| public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException Implements org. Performs the enhancement.
| |
| Modifier and Type | Field and Description |
|---|---|
| private AnnotationList | |
| private final ByteBuddyEnhancementContext | |
| private final FieldDescription | |
| private Optional |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv FieldDescription. | |
| private AnnotationList | |
| pack-priv <T extends Annotation> AnnotationDescription. | |
| private AnnotationList | |
| pack-priv TypeDefinition | |
| pack-priv String | |
| pack-priv FieldDescription | |
| pack-priv Optional | |
| pack-priv String | |
| pack-priv TypeDescription. | |
| public boolean | hasAnnotation(Class<? extends Annotation> annotationType)
Implements org. |
| pack-priv boolean | |
| public String |
| annotations | back to summary |
|---|---|
| private AnnotationList annotations | |
| context | back to summary |
|---|---|
| private final ByteBuddyEnhancementContext context | |
| fieldDescription | back to summary |
|---|---|
| private final FieldDescription fieldDescription | |
| getter | back to summary |
|---|---|
| private Optional<MethodDescription> getter | |
| AnnotatedFieldDescription | back to summary |
|---|---|
| pack-priv AnnotatedFieldDescription(ByteBuddyEnhancementContext context, FieldDescription fieldDescription) | |
| asDefined | back to summary |
|---|---|
| pack-priv FieldDescription. | |
| doGetAnnotations | back to summary |
|---|---|
| private AnnotationList doGetAnnotations() | |
| getAnnotation | back to summary |
|---|---|
| pack-priv <T extends Annotation> AnnotationDescription. | |
| getAnnotations | back to summary |
|---|---|
| private AnnotationList getAnnotations() | |
| getDeclaringType | back to summary |
|---|---|
| pack-priv TypeDefinition getDeclaringType() | |
| getDescriptor | back to summary |
|---|---|
| pack-priv String getDescriptor() | |
| getFieldDescription | back to summary |
|---|---|
| pack-priv FieldDescription getFieldDescription() | |
| getGetter | back to summary |
|---|---|
| pack-priv Optional | |
| getName | back to summary |
|---|---|
| pack-priv String getName() | |
| getType | back to summary |
|---|---|
| pack-priv TypeDescription. | |
| hasAnnotation | back to summary |
|---|---|
| public boolean hasAnnotation(Class<? extends Annotation> annotationType) Implements org.
| |
| isVisibleTo | back to summary |
|---|---|
| pack-priv boolean isVisibleTo(TypeDescription typeDescription) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DynamicType. | |
| public void | |
| public void | |
| public void |
| applied | back to summary |
|---|---|
| private boolean applied | |
| managedEntity | back to summary |
|---|---|
| private boolean managedEntity | |
| persistentAttributeInterceptable | back to summary |
|---|---|
| private boolean persistentAttributeInterceptable | |
| selfDirtynessTracker | back to summary |
|---|---|
| private boolean selfDirtynessTracker | |
| typeName | back to summary |
|---|---|
| private final String typeName | |
| EnhancementStatus | back to summary |
|---|---|
| public EnhancementStatus(String typeName) | |
| applySuperInterfaceOptimisations | back to summary |
|---|---|
| public DynamicType. | |
| enabledInterfaceManagedEntity | back to summary |
|---|---|
| public void enabledInterfaceManagedEntity() | |
| enabledInterfacePersistentAttributeInterceptable | back to summary |
|---|---|
| public void enabledInterfacePersistentAttributeInterceptable() | |
| enabledInterfaceSelfDirtinessTracker | back to summary |
|---|---|
| public void enabledInterfaceSelfDirtinessTracker() | |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private ClassFileLocator. |
| Access | Constructor and Description |
|---|---|
| protected | EnhancerClassFileLocator(ClassLoader
The class loader to query which must not be the bootstrap class loader, i.e. classLoader)null.Creates a new class file locator for the given class loader. |
| Modifier and Type | Method and Description |
|---|---|
| public ClassFileLocator. | locate(String
The name of the type to locate a class file representation for. className)Overrides net. Implements net. |
| pack-priv void |
| className | back to summary |
|---|---|
| private String className | |
| resolution | back to summary |
|---|---|
| private ClassFileLocator. | |
| EnhancerClassFileLocator | back to summary |
|---|---|
| protected EnhancerClassFileLocator(ClassLoader classLoader) Creates a new class file locator for the given class loader.
| |
| locate | back to summary |
|---|---|
| public ClassFileLocator. Overrides net. Implements net. Doc from net. Locates the class file for a given type and returns the binary data of the class file.
| |
| setClassNameAndBytes | back to summary |
|---|---|
| pack-priv void setClassNameAndBytes(String className, byte[] bytes) | |