Class ClassInfo

    • Field Detail

      • DEBUG

        private static final boolean DEBUG
      • methodsInCallOrder

        private final MethodInfo[] methodsInCallOrder
      • immediateEnclosingClass

        private final ClassDescriptor immediateEnclosingClass
      • classSourceSignature

        private final java.lang.String classSourceSignature
      • source

        private final java.lang.String source
      • usesConcurrency

        private final boolean usesConcurrency
      • hasStubs

        private final boolean hasStubs
      • containingScopeCached

        private boolean containingScopeCached
    • Constructor Detail

      • ClassInfo

        private ClassInfo​(ClassDescriptor classDescriptor,
                          java.lang.String classSourceSignature,
                          ClassDescriptor superclassDescriptor,
                          ClassDescriptor[] interfaceDescriptorList,
                          ICodeBaseEntry codeBaseEntry,
                          int accessFlags,
                          java.lang.String source,
                          int majorVersion,
                          int minorVersion,
                          java.util.Collection<ClassDescriptor> referencedClassDescriptorList,
                          java.util.Set<ClassDescriptor> calledClassDescriptors,
                          java.util.Map<ClassDescriptor,​AnnotationValue> classAnnotations,
                          FieldInfo[] fieldDescriptorList,
                          MethodInfo[] methodInfoList,
                          ClassDescriptor immediateEnclosingClass,
                          boolean usesConcurrency,
                          boolean hasStubs)
        Parameters:
        classDescriptor - ClassDescriptor representing the class name
        superclassDescriptor - ClassDescriptor representing the superclass name
        interfaceDescriptorList - ClassDescriptors representing implemented interface names
        codeBaseEntry - codebase entry class was loaded from
        accessFlags - class's access flags
        referencedClassDescriptorList - ClassDescriptors of all classes/interfaces referenced by the class
        fieldDescriptorList - FieldDescriptors of fields defined in the class
        methodInfoList - MethodDescriptors of methods defined in the class
    • Method Detail

      • computeMethodsInCallOrder

        private MethodInfo[] computeMethodsInCallOrder()
      • getXFields

        public java.util.List<? extends XField> getXFields()
        Specified by:
        getXFields in interface XClass
      • getXMethodsInCallOrder

        public java.util.List<? extends XMethod> getXMethodsInCallOrder()
      • findMethod

        public XMethod findMethod​(java.lang.String methodName,
                                  java.lang.String methodSig,
                                  boolean isStatic)
        Description copied from interface: XClass
        Find an XMethod matching given parameters.
        Specified by:
        findMethod in interface XClass
        Parameters:
        methodName - name of the method
        methodSig - signature of the method
        isStatic - true if the method is static, false if not
        Returns:
        matching XMethod, or null if there is no matching XMethod
      • findMethod

        public XMethod findMethod​(MethodDescriptor descriptor)
        Description copied from interface: XClass
        Find XMethod matching given MethodDescriptor.
        Specified by:
        findMethod in interface XClass
        Parameters:
        descriptor - a MethodDescriptor
        Returns:
        matching XMethod, or null if there is no matching method
      • findMatchingMethod

        public XMethod findMatchingMethod​(MethodDescriptor descriptor)
        Description copied from interface: XClass
        Find XMethod matching the name and signature of the supplied method MethodDescriptor. The class descriptor of the argument is ignored.
        Specified by:
        findMatchingMethod in interface XClass
        Parameters:
        descriptor - a MethodDescriptor
        Returns:
        matching XMethod, or null if there is no matching method
      • findField

        public XField findField​(java.lang.String name,
                                java.lang.String signature,
                                boolean isStatic)
        Description copied from interface: XClass
        Find an XField matching given parameters.
        Specified by:
        findField in interface XClass
        Parameters:
        name - name of the field
        signature - signature of the field
        isStatic - true if field is static, false if not
        Returns:
        XField, or null if there is no matching XField
      • getImmediateEnclosingClass

        public ClassDescriptor getImmediateEnclosingClass()
        Description copied from interface: XClass
        Get the ClassDescriptor of the immediate enclosing class, or null if this XClass is not a nested or inner class.
        Specified by:
        getImmediateEnclosingClass in interface XClass
        Returns:
        the ClassDescriptor of the immediate enclosing class, or null if this XClass is not a nested or inner class
      • getPackageName

        public java.lang.String getPackageName()
        Description copied from class: ClassDescriptor
        Get the name of the package in dotted format.
        Overrides:
        getPackageName in class ClassDescriptor
        Returns:
        the name of the package in dotted format
      • getSlashedPackageName

        public java.lang.String getSlashedPackageName()
      • addAnnotation

        public void addAnnotation​(AnnotationValue annotationValue)
        Destructively add an annotation to the object. In general, this is not a great idea, since it could cause the same class to appear to have different annotations at different times. However, this method is necessary for "built-in" annotations that FindBugs adds to system classes. As long as we add such annotations early enough that nobody will notice, we should be ok.
        Parameters:
        annotationValue - an AnnotationValue to add to the class
      • getSource

        @CheckForNull
        public java.lang.String getSource()
        Specified by:
        getSource in interface XClass
        Returns:
        the Source attribute
      • getContainingScope0

        @CheckForNull
        public AnnotatedObject getContainingScope0()
      • getSourceSignature

        public java.lang.String getSourceSignature()
        Specified by:
        getSourceSignature in interface XClass
      • hasStubs

        public boolean hasStubs()
        Specified by:
        hasStubs in interface XClass