// Generated by delombok at Sun Feb 26 12:31:38 KST 2017
package scouter.bytebuddy.dynamic.scaffold.inline;
import scouter.bytebuddy.ClassFileVersion;
import scouter.bytebuddy.asm.AsmVisitorWrapper;
import scouter.bytebuddy.description.method.MethodDescription;
import scouter.bytebuddy.description.type.TypeDescription;
import scouter.bytebuddy.dynamic.ClassFileLocator;
import scouter.bytebuddy.dynamic.DynamicType;
import scouter.bytebuddy.dynamic.TypeResolutionStrategy;
import scouter.bytebuddy.dynamic.scaffold.*;
import scouter.bytebuddy.implementation.Implementation;
import scouter.bytebuddy.implementation.attribute.AnnotationRetention;
import scouter.bytebuddy.implementation.attribute.AnnotationValueFilter;
import scouter.bytebuddy.implementation.attribute.TypeAttributeAppender;
import scouter.bytebuddy.implementation.auxiliary.AuxiliaryType;
import scouter.bytebuddy.matcher.LatentMatcher;
import scouter.bytebuddy.pool.TypePool;
/**
* An abstract base implementation of a dynamic type builder that alters an existing type.
*
* @param <T> A loaded type that the dynamic type is guaranteed to be a subtype of.
*/
public abstract class AbstractInliningDynamicTypeBuilder<T> extends DynamicType.Builder.AbstractBase.Adapter<T> {
/**
* The original type that is being redefined or rebased.
*/
protected final TypeDescription originalType;
/**
* The class file locator for locating the original type's class file.
*/
protected final ClassFileLocator classFileLocator;
/**
* Creates an inlining dynamic type builder.
*
* @param instrumentedType An instrumented type representing the subclass.
* @param fieldRegistry The field pool to use.
* @param methodRegistry The method pool to use.
* @param typeAttributeAppender The type attribute appender to apply onto the instrumented type.
* @param asmVisitorWrapper The ASM visitor wrapper to apply onto the class writer.
* @param classFileVersion The class file version to use for types that are not based on an existing class file.
* @param auxiliaryTypeNamingStrategy The naming strategy to use for naming auxiliary types.
* @param annotationValueFilterFactory The annotation value filter factory to use.
* @param annotationRetention The annotation retention strategy to use.
* @param implementationContextFactory The implementation context factory to use.
* @param methodGraphCompiler The method graph compiler to use.
* @param typeValidation Determines if a type should be explicitly validated.
* @param ignoredMethods A matcher for identifying methods that should be excluded from instrumentation.
* @param originalType The original type that is being redefined or rebased.
* @param classFileLocator The class file locator for locating the original type's class file.
*/
protected AbstractInliningDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType, FieldRegistry fieldRegistry, MethodRegistry methodRegistry, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType, ClassFileLocator classFileLocator) {
super(instrumentedType, fieldRegistry, methodRegistry, typeAttributeAppender, asmVisitorWrapper, classFileVersion, auxiliaryTypeNamingStrategy, annotationValueFilterFactory, annotationRetention, implementationContextFactory, methodGraphCompiler, typeValidation, ignoredMethods);
this.originalType = originalType;
this.classFileLocator = classFileLocator;
}
@Override
public DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy) {
return make(typeResolutionStrategy, TypePool.Default.of(classFileLocator));
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof AbstractInliningDynamicTypeBuilder)) return false;
final AbstractInliningDynamicTypeBuilder<?> other = (AbstractInliningDynamicTypeBuilder<?>) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$originalType = this.originalType;
final java.lang.Object other$originalType = other.originalType;
if (this$originalType == null ? other$originalType != null : !this$originalType.equals(other$originalType)) return false;
final java.lang.Object this$classFileLocator = this.classFileLocator;
final java.lang.Object other$classFileLocator = other.classFileLocator;
if (this$classFileLocator == null ? other$classFileLocator != null : !this$classFileLocator.equals(other$classFileLocator)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AbstractInliningDynamicTypeBuilder;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + super.hashCode();
final java.lang.Object $originalType = this.originalType;
result = result * PRIME + ($originalType == null ? 43 : $originalType.hashCode());
final java.lang.Object $classFileLocator = this.classFileLocator;
result = result * PRIME + ($classFileLocator == null ? 43 : $classFileLocator.hashCode());
return result;
}
}