Package aQute.bnd.osgi
Class Clazz
java.lang.Object
aQute.bnd.osgi.Clazz
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) classclass(package private) classclass(package private) final classstatic enumclassclassstatic classstatic enumclass(package private) final class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) final Analyzerprivate Set<Descriptors.TypeRef>private Set<Descriptors.PackageRef>private int(package private) Clazz.ClassDefprivate ClassFileprivate ConstantPoolprivate intstatic final EnumSet<Clazz.QUERY>private booleanprivate booleanprivate booleanprivate Set<Descriptors.PackageRef>private Descriptors.TypeRef[]private static final org.slf4j.Loggerstatic final Comparator<Clazz>(package private) final Stringprivate Map<Descriptors.TypeRef,Integer> (package private) final Resource(package private) Descriptors.TypeRefstatic final intstatic final intprivate Set<Descriptors.TypeRef> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ObjectannotationDefault(AnnotationDefaultAttribute attribute, int access_flags) annotations(String binaryNameFilter) annotationValues(ElementValueInfo[] values, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidclassConstRef(int index) private voidclassConstRef(String name) (package private) static Annotation.ElementTypeelementType(ClassFile classFile) (package private) static Annotation.ElementTypeelementType(FieldInfo fieldInfo) (package private) static Annotation.ElementTypeelementType(MethodInfo methodInfo) fields()private intfindMethodReference(String clazz, String methodname, String descriptor) Find a method reference in the pool that points to the given class, methodname and descriptor.intgetFQN()getSuper()booleanhierarchyStream(Analyzer analyzer) booleanis(Clazz.QUERY query, Instruction instr, Analyzer analyzer) booleanboolean(package private) static booleanisAnnotation(int access) booleanbooleanisEnum()(package private) static booleanisEnum(int access) booleanisFinal()booleanbooleanbooleanisModule()(package private) static booleanisModule(int access) booleanbooleanbooleanisPublic()boolean(package private) static booleanisSynthetic(int access) methods()(package private) AnnotationnewAnnotation(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private ObjectnewElementValue(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) (package private) ParameterAnnotationnewParameterAnnotation(int parameter, AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) (package private) TypeAnnotationnewTypeAnnotation(TypeAnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) static StringobjectDescriptorToFQN(String string) private Set<Descriptors.TypeRef>private Set<Descriptors.TypeRef>private voidprocessAnnotation(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidprocessAnnotationDefault(AnnotationDefaultAttribute attribute, Annotation.ElementType elementType, int access_flags) private voidprocessAnnotations(AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidprocessAttributes(Attribute[] attributes, Annotation.ElementType elementType, int access_flags) Called for the attributes in the class, field, method or Code attribute.private voidprocessBootstrapMethods(BootstrapMethodsAttribute attribute) private voidprocessCode(CodeAttribute attribute, Annotation.ElementType elementType) private voidprocessElementValue(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidprocessEnclosingMethod(EnclosingMethodAttribute attribute) private voidprocessExceptions(ExceptionsAttribute attribute, int access_flags) private voidprocessParameterAnnotations(ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidprocessSignature(SignatureAttribute attribute, Annotation.ElementType elementType, int access_flags) private voidprocessStackMapTable(StackMapTableAttribute attribute) private voidprocessTypeAnnotations(TypeAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidreferTo(Descriptors.TypeRef typeRef, int modifiers) Add a new package reference.private voidtoString()typeAnnotations(String binaryNameFilter) private Stream<Descriptors.TypeRef>typeStream(Analyzer analyzer, Function<? super Clazz, Collection<? extends Descriptors.TypeRef>> func, Set<Descriptors.TypeRef> visited) static Stringprivate voidverification_type_info(StackMapTableAttribute.VerificationTypeInfo verificationTypeInfo) private voidvisitAnnotationDefault(ClassDataCollector cd, AnnotationDefaultAttribute attribute, Clazz.ElementDef elementDef) private voidvisitAnnotations(ClassDataCollector cd, AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidvisitAttributes(ClassDataCollector cd, Clazz.ElementDef elementDef) Called for the attributes in the class, field, or method.private voidprivate voidvisitCode(ClassDataCollector cd, CodeAttribute attribute, Annotation.ElementType elementType) private voidvisitConstantValue(ClassDataCollector cd, ConstantValueAttribute attribute) private voidvisitEnclosingMethod(ClassDataCollector cd, EnclosingMethodAttribute attribute) private voidvisitInnerClasses(ClassDataCollector cd, InnerClassesAttribute attribute) private voidvisitMethodParameters(ClassDataCollector cd, MethodParametersAttribute attribute, Clazz.ElementDef elementDef) private voidvisitParameterAnnotations(ClassDataCollector cd, ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private voidvisitReferenceMethod(ClassDataCollector cd, int method_ref_index) Called when crawling the byte code and a method reference is foundprivate voidvisitSignature(ClassDataCollector cd, SignatureAttribute attribute) private voidvisitTypeAnnotations(ClassDataCollector cd, TypeAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
HAS_ARGUMENT
-
ACC_SYNTHETIC
static final int ACC_SYNTHETIC- See Also:
-
ACC_BRIDGE
static final int ACC_BRIDGE- See Also:
-
NAME_COMPARATOR
-
hasRuntimeAnnotations
private boolean hasRuntimeAnnotations -
hasClassAnnotations
private boolean hasClassAnnotations -
hasDefaultConstructor
private boolean hasDefaultConstructor -
imports
-
xref
-
annotations
-
forName
private int forName -
class$
private int class$ -
api
-
classFile
-
constantPool
-
superClass
Descriptors.TypeRef superClass -
interfaces
-
classDef
Clazz.ClassDef classDef -
referred
-
analyzer
-
path
-
resource
-
TYPEUSE_INDEX_NONE
public static final int TYPEUSE_INDEX_NONE- See Also:
-
TYPEUSE_TARGET_INDEX_EXTENDS
public static final int TYPEUSE_TARGET_INDEX_EXTENDS- See Also:
-
-
Constructor Details
-
Clazz
-
-
Method Details
-
parseClassFile
- Throws:
Exception
-
parseClassFile
- Throws:
Exception
-
parseClassFileWithCollector
- Throws:
Exception
-
parseClassFile
public Set<Descriptors.TypeRef> parseClassFile(InputStream in, ClassDataCollector cd) throws Exception - Throws:
Exception
-
parseClassFileData
private Set<Descriptors.TypeRef> parseClassFileData(DataInput in, ClassDataCollector cd) throws Exception - Throws:
Exception
-
parseClassFileData
- Throws:
Exception
-
visitClassFile
- Throws:
Exception
-
fields
-
methods
-
findMethodReference
Find a method reference in the pool that points to the given class, methodname and descriptor.- Parameters:
clazz-methodname-descriptor-- Returns:
- index in constant pool
-
processAttributes
private void processAttributes(Attribute[] attributes, Annotation.ElementType elementType, int access_flags) Called for the attributes in the class, field, method or Code attribute. -
visitAttributes
Called for the attributes in the class, field, or method.- Throws:
Exception
-
processEnclosingMethod
-
visitEnclosingMethod
-
visitInnerClasses
private void visitInnerClasses(ClassDataCollector cd, InnerClassesAttribute attribute) throws Exception - Throws:
Exception
-
processSignature
private void processSignature(SignatureAttribute attribute, Annotation.ElementType elementType, int access_flags) -
visitSignature
-
processAnnotationDefault
private void processAnnotationDefault(AnnotationDefaultAttribute attribute, Annotation.ElementType elementType, int access_flags) -
visitAnnotationDefault
private void visitAnnotationDefault(ClassDataCollector cd, AnnotationDefaultAttribute attribute, Clazz.ElementDef elementDef) -
elementType
-
elementType
-
elementType
-
annotationDefault
-
visitConstantValue
-
processExceptions
-
visitMethodParameters
private void visitMethodParameters(ClassDataCollector cd, MethodParametersAttribute attribute, Clazz.ElementDef elementDef) -
processCode
-
visitCode
private void visitCode(ClassDataCollector cd, CodeAttribute attribute, Annotation.ElementType elementType) throws Exception - Throws:
Exception
-
visitReferenceMethod
Called when crawling the byte code and a method reference is found -
processParameterAnnotations
private void processParameterAnnotations(ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
visitParameterAnnotations
private void visitParameterAnnotations(ClassDataCollector cd, ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) throws Exception - Throws:
Exception
-
processTypeAnnotations
private void processTypeAnnotations(TypeAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
visitTypeAnnotations
private void visitTypeAnnotations(ClassDataCollector cd, TypeAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) throws Exception - Throws:
Exception
-
processAnnotations
private void processAnnotations(AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
visitAnnotations
private void visitAnnotations(ClassDataCollector cd, AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) throws Exception - Throws:
Exception
-
processAnnotation
private void processAnnotation(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
newAnnotation
Annotation newAnnotation(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
newParameterAnnotation
ParameterAnnotation newParameterAnnotation(int parameter, AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
newTypeAnnotation
TypeAnnotation newTypeAnnotation(TypeAnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
annotationValues
private Map<String,Object> annotationValues(ElementValueInfo[] values, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
processElementValue
private void processElementValue(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
newElementValue
private Object newElementValue(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) -
processBootstrapMethods
-
processStackMapTable
-
verification_type_info
private void verification_type_info(StackMapTableAttribute.VerificationTypeInfo verificationTypeInfo) -
referTo
Add a new package reference. -
referTo
-
getReferred
-
getAbsolutePath
-
hierarchyStream
-
typeStream
private Stream<Descriptors.TypeRef> typeStream(Analyzer analyzer, Function<? super Clazz, Collection<? extends Descriptors.TypeRef>> func, Set<Descriptors.TypeRef> visited) -
is
- Throws:
Exception
-
toString
-
isPublic
public boolean isPublic() -
isProtected
public boolean isProtected() -
isEnum
public boolean isEnum() -
isSynthetic
public boolean isSynthetic() -
isSynthetic
static boolean isSynthetic(int access) -
isModule
public boolean isModule() -
isPackageInfo
public boolean isPackageInfo() -
isModule
static boolean isModule(int access) -
isEnum
static boolean isEnum(int access) -
getFormat
-
objectDescriptorToFQN
-
unCamel
-
isInterface
public boolean isInterface() -
isAbstract
public boolean isAbstract() -
hasPublicNoArgsConstructor
public boolean hasPublicNoArgsConstructor() -
getAccess
public int getAccess() -
annotations
-
typeAnnotations
-
getClassName
-
isInnerClass
public boolean isInnerClass() -
getSuper
-
getFQN
-
getInterfaces
-
interfaces
-
annotations
-
isFinal
public boolean isFinal() -
isDeprecated
public boolean isDeprecated() -
isAnnotation
public boolean isAnnotation() -
isAnnotation
static boolean isAnnotation(int access) -
getAPIUses
-
getExtends
-
getImplements
-
classConstRef
private void classConstRef(int index) -
classConstRef
-
getClassSignature
-
getSourceFile
-
getDefaults
- Throws:
Exception
-
getResource
-