Java Code Examples for net.bytebuddy.utility.OpenedClassReader#ASM_API
The following examples show how to use
net.bytebuddy.utility.OpenedClassReader#ASM_API .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModifierAdjustment.java From byte-buddy with Apache License 2.0 | 6 votes |
/** * Creates a new modifier adjusting visitor. * * @param classVisitor The class visitor to delegate to. * @param typeAdjustments A list of type modifier adjustments to apply. * @param fieldAdjustments A list of field modifier adjustments to apply. * @param methodAdjustments A list of method modifier adjustments to apply. * @param instrumentedType The instrumented type. * @param fields A mapping of field names and descriptors to their description. * @param methods A mapping of method names and descriptors to their description. */ protected ModifierAdjustingClassVisitor(ClassVisitor classVisitor, List<Adjustment<TypeDescription>> typeAdjustments, List<Adjustment<FieldDescription.InDefinedShape>> fieldAdjustments, List<Adjustment<MethodDescription>> methodAdjustments, TypeDescription instrumentedType, Map<String, FieldDescription.InDefinedShape> fields, Map<String, MethodDescription> methods) { super(OpenedClassReader.ASM_API, classVisitor); this.typeAdjustments = typeAdjustments; this.fieldAdjustments = fieldAdjustments; this.methodAdjustments = methodAdjustments; this.instrumentedType = instrumentedType; this.fields = fields; this.methods = methods; }
Example 2
Source File: MemberRemoval.java From byte-buddy with Apache License 2.0 | 5 votes |
/** * Creates a new member removing class visitor. * * @param classVisitor The class visitor to delegate to. * @param fieldMatcher The matcher that determines field removal. * @param methodMatcher The matcher that determines method removal. * @param fields A mapping of field names and descriptors to their description. * @param methods A mapping of method names and descriptors to their description. */ protected MemberRemovingClassVisitor(ClassVisitor classVisitor, ElementMatcher.Junction<FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher.Junction<MethodDescription> methodMatcher, Map<String, FieldDescription.InDefinedShape> fields, Map<String, MethodDescription> methods) { super(OpenedClassReader.ASM_API, classVisitor); this.fieldMatcher = fieldMatcher; this.methodMatcher = methodMatcher; this.fields = fields; this.methods = methods; }
Example 3
Source File: TypeReferenceAdjustment.java From byte-buddy with Apache License 2.0 | 5 votes |
/** * Creates a type reference class visitor. * * @param classVisitor {@code true} if the visitor should throw an exception if a type reference cannot be located. * @param strict {@code true} if the visitor should throw an exception if a type reference cannot be located. * @param filter A filter for excluding types from type reference analysis. * @param typePool The type pool to use for locating types. */ protected TypeReferenceClassVisitor(ClassVisitor classVisitor, boolean strict, ElementMatcher<? super TypeDescription> filter, TypePool typePool) { super(OpenedClassReader.ASM_API, classVisitor); this.typePool = typePool; this.strict = strict; this.filter = filter; observedTypes = new HashSet<String>(); visitedInnerTypes = new HashSet<String>(); }
Example 4
Source File: MemberAttributeExtension.java From byte-buddy with Apache License 2.0 | 5 votes |
/** * Creates a new field attribute visitor. * * @param fieldVisitor The field visitor to apply changes to. * @param fieldDescription The field to add annotations to. * @param fieldAttributeAppender The field attribute appender to apply. * @param annotationValueFilter The annotation value filter to apply. */ private FieldAttributeVisitor(FieldVisitor fieldVisitor, FieldDescription fieldDescription, FieldAttributeAppender fieldAttributeAppender, AnnotationValueFilter annotationValueFilter) { super(OpenedClassReader.ASM_API, fieldVisitor); this.fieldDescription = fieldDescription; this.fieldAttributeAppender = fieldAttributeAppender; this.annotationValueFilter = annotationValueFilter; }
Example 5
Source File: TypeWriterDeclarationPreservationTest.java From byte-buddy with Apache License 2.0 | 5 votes |
private TypeValidator(ClassVisitor classVisitor, int modifiers, Set<InnerClassAttribute> innerClassAttributes, OuterClassAttribute outerClassAttribute) { super(OpenedClassReader.ASM_API, classVisitor); this.modifiers = modifiers; this.innerClassAttributes = innerClassAttributes; this.outerClassAttribute = outerClassAttribute; }
Example 6
Source File: StackAwareMethodVisitor.java From byte-buddy with Apache License 2.0 | 5 votes |
/** * Creates a new stack aware method visitor. * * @param methodVisitor The method visitor to delegate operations to. * @param instrumentedMethod The method description for which this method visitor is applied. */ public StackAwareMethodVisitor(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) { super(OpenedClassReader.ASM_API, methodVisitor); current = new ArrayList<StackSize>(); sizes = new HashMap<Label, List<StackSize>>(); freeIndex = instrumentedMethod.getStackSize(); }
Example 7
Source File: TypeWriterDeclarationPreservationTest.java From byte-buddy with Apache License 2.0 | 4 votes |
private TypeModifierExtractor() { super(OpenedClassReader.ASM_API); }
Example 8
Source File: AnalyzedClass.java From kanela with Apache License 2.0 | 4 votes |
private static ClassNode convertToClassNode(InputStream classBytes) throws IOException { val result = new ClassNode(OpenedClassReader.ASM_API); val reader = new ClassReader(classBytes); reader.accept(result, ClassReader.SKIP_FRAMES); return result; }
Example 9
Source File: MixinClassVisitor.java From kanela with Apache License 2.0 | 4 votes |
private MixinClassVisitor(MixinDescription mixin, String className, ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); this.mixin = mixin; this.type = Type.getObjectType(className); }
Example 10
Source File: MixinInitializer.java From kanela with Apache License 2.0 | 4 votes |
MixinInitializer(MethodVisitor mv, int access, String name, String desc, Type typeClass, MixinDescription mixinDescription) { super(OpenedClassReader.ASM_API, mv, access, name, desc); this.typeClass = typeClass; this.mixinDescription = mixinDescription; }
Example 11
Source File: AbstractTypeDescriptionGenericTest.java From byte-buddy with Apache License 2.0 | 4 votes |
public GenericDisintegrator(ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); }
Example 12
Source File: ClassFileVersionValidatorClassVisitor.java From kanela with Apache License 2.0 | 4 votes |
private ClassFileVersionValidatorClassVisitor(ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); }
Example 13
Source File: MetadataAwareClassVisitorTest.java From byte-buddy with Apache License 2.0 | 4 votes |
private DelegatingMetadataAwareClassVisitor() { super(OpenedClassReader.ASM_API, null); }
Example 14
Source File: TypeReferenceAdjustmentTest.java From byte-buddy with Apache License 2.0 | 4 votes |
private AssertionClassVisitor(ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); }
Example 15
Source File: AdviceTypeTest.java From byte-buddy with Apache License 2.0 | 4 votes |
public SerializationClassVisitor(ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); }
Example 16
Source File: FramePaddingMethodVisitor.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a new frame padding method visitor. * * @param methodVisitor The delegate method visitor. */ public FramePaddingMethodVisitor(MethodVisitor methodVisitor) { super(OpenedClassReader.ASM_API, methodVisitor); padding = false; }
Example 17
Source File: TypeReferenceAdjustment.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a new type reference-collecting field visitor. * * @param fieldVisitor The field visitor to delegate to. */ protected TypeReferenceFieldVisitor(FieldVisitor fieldVisitor) { super(OpenedClassReader.ASM_API, fieldVisitor); }
Example 18
Source File: TypeConstantAdjustment.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a new type constant dissolving class visitor. * * @param classVisitor The underlying class visitor. */ protected TypeConstantDissolvingClassVisitor(ClassVisitor classVisitor) { super(OpenedClassReader.ASM_API, classVisitor); }
Example 19
Source File: AsmVisitorWrapper.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a new dispatching visitor. * * @param classVisitor The underlying class visitor. * @param instrumentedType The instrumented type. * @param fields The instrumented type's declared fields. */ protected DispatchingVisitor(ClassVisitor classVisitor, TypeDescription instrumentedType, Map<String, FieldDescription.InDefinedShape> fields) { super(OpenedClassReader.ASM_API, classVisitor); this.instrumentedType = instrumentedType; this.fields = fields; }
Example 20
Source File: TypeReferenceAdjustment.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a new type reference-collecting annotation visitor. * * @param annotationVisitor The annotation visitor to delegate to. */ protected TypeReferenceAnnotationVisitor(AnnotationVisitor annotationVisitor) { super(OpenedClassReader.ASM_API, annotationVisitor); }