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) class
class
(package private) class
class
(package private) final class
static enum
class
class
static class
static enum
class
(package private) final class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
(package private) final Analyzer
private Set<Descriptors.TypeRef>
private Set<Descriptors.PackageRef>
private int
(package private) Clazz.ClassDef
private ClassFile
private ConstantPool
private int
static final EnumSet<Clazz.QUERY>
private boolean
private boolean
private boolean
private Set<Descriptors.PackageRef>
private Descriptors.TypeRef[]
private static final org.slf4j.Logger
static final Comparator<Clazz>
(package private) final String
private Map<Descriptors.TypeRef,
Integer> (package private) final Resource
(package private) Descriptors.TypeRef
static final int
static final int
private Set<Descriptors.TypeRef>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Object
annotationDefault
(AnnotationDefaultAttribute attribute, int access_flags) annotations
(String binaryNameFilter) annotationValues
(ElementValueInfo[] values, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
classConstRef
(int index) private void
classConstRef
(String name) (package private) static Annotation.ElementType
elementType
(ClassFile classFile) (package private) static Annotation.ElementType
elementType
(FieldInfo fieldInfo) (package private) static Annotation.ElementType
elementType
(MethodInfo methodInfo) fields()
private int
findMethodReference
(String clazz, String methodname, String descriptor) Find a method reference in the pool that points to the given class, methodname and descriptor.int
getFQN()
getSuper()
boolean
hierarchyStream
(Analyzer analyzer) boolean
is
(Clazz.QUERY query, Instruction instr, Analyzer analyzer) boolean
boolean
(package private) static boolean
isAnnotation
(int access) boolean
boolean
isEnum()
(package private) static boolean
isEnum
(int access) boolean
isFinal()
boolean
boolean
boolean
isModule()
(package private) static boolean
isModule
(int access) boolean
boolean
boolean
isPublic()
boolean
(package private) static boolean
isSynthetic
(int access) methods()
(package private) Annotation
newAnnotation
(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private Object
newElementValue
(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) (package private) ParameterAnnotation
newParameterAnnotation
(int parameter, AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) (package private) TypeAnnotation
newTypeAnnotation
(TypeAnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) static String
objectDescriptorToFQN
(String string) private Set<Descriptors.TypeRef>
private Set<Descriptors.TypeRef>
private void
processAnnotation
(AnnotationInfo annotationInfo, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
processAnnotationDefault
(AnnotationDefaultAttribute attribute, Annotation.ElementType elementType, int access_flags) private void
processAnnotations
(AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
processAttributes
(Attribute[] attributes, Annotation.ElementType elementType, int access_flags) Called for the attributes in the class, field, method or Code attribute.private void
processBootstrapMethods
(BootstrapMethodsAttribute attribute) private void
processCode
(CodeAttribute attribute, Annotation.ElementType elementType) private void
processElementValue
(Object value, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
processEnclosingMethod
(EnclosingMethodAttribute attribute) private void
processExceptions
(ExceptionsAttribute attribute, int access_flags) private void
processParameterAnnotations
(ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
processSignature
(SignatureAttribute attribute, Annotation.ElementType elementType, int access_flags) private void
processStackMapTable
(StackMapTableAttribute attribute) private void
processTypeAnnotations
(TypeAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
referTo
(Descriptors.TypeRef typeRef, int modifiers) Add a new package reference.private void
toString()
typeAnnotations
(String binaryNameFilter) private Stream<Descriptors.TypeRef>
typeStream
(Analyzer analyzer, Function<? super Clazz, Collection<? extends Descriptors.TypeRef>> func, Set<Descriptors.TypeRef> visited) static String
private void
verification_type_info
(StackMapTableAttribute.VerificationTypeInfo verificationTypeInfo) private void
visitAnnotationDefault
(ClassDataCollector cd, AnnotationDefaultAttribute attribute, Clazz.ElementDef elementDef) private void
visitAnnotations
(ClassDataCollector cd, AnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
visitAttributes
(ClassDataCollector cd, Clazz.ElementDef elementDef) Called for the attributes in the class, field, or method.private void
private void
visitCode
(ClassDataCollector cd, CodeAttribute attribute, Annotation.ElementType elementType) private void
visitConstantValue
(ClassDataCollector cd, ConstantValueAttribute attribute) private void
visitEnclosingMethod
(ClassDataCollector cd, EnclosingMethodAttribute attribute) private void
visitInnerClasses
(ClassDataCollector cd, InnerClassesAttribute attribute) private void
visitMethodParameters
(ClassDataCollector cd, MethodParametersAttribute attribute, Clazz.ElementDef elementDef) private void
visitParameterAnnotations
(ClassDataCollector cd, ParameterAnnotationsAttribute attribute, Annotation.ElementType elementType, RetentionPolicy policy, int access_flags) private void
visitReferenceMethod
(ClassDataCollector cd, int method_ref_index) Called when crawling the byte code and a method reference is foundprivate void
visitSignature
(ClassDataCollector cd, SignatureAttribute attribute) private void
visitTypeAnnotations
(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
-