Skip to content
alantr7 edited this page Oct 13, 2022 · 1 revision

Getting started

// Reads a Java class file at the specified path
ClassReader reader = new ClassReader(new FileInputStream(new File("PATH TO YOUR FILE")));
RawClass rawClass = reader.read();

// Wraps the raw class (loads names, signatures, descriptors, etc. for fields, methods, etc.)
ClassInfo klass = ClassWrapper.newBuilder().build().wrap(rawClass);

Component

Component is a super class that contains fields and methods that are shared between Class, Field and Method objects.

String getName();

AccessFlag[] getAccessFlags();

AttributeInfo[] getAttributes();

AnnotationInfo[] getAnnotationInfos();

Annotation[] getAnnotations();

Visibility getVisibility();

Clone this wiki locally