Class ArrayClassInfo

    • Field Detail

      • arrayTypeSignature

        private ArrayTypeSignature arrayTypeSignature
        The array type signature.
      • elementClassInfo

        private ClassInfo elementClassInfo
        The element class info.
    • Constructor Detail

      • ArrayClassInfo

        ArrayClassInfo()
        Default constructor for deserialization.
      • ArrayClassInfo

        ArrayClassInfo​(ArrayTypeSignature arrayTypeSignature)
        Constructor.
        Parameters:
        arrayTypeSignature - the array type signature
    • Method Detail

      • setScanResult

        void setScanResult​(ScanResult scanResult)
        Description copied from class: ScanResultObject
        Set ScanResult backreferences in info objects after scan has completed.
        Overrides:
        setScanResult in class ClassInfo
        Parameters:
        scanResult - the scan result
      • getTypeSignatureStr

        public java.lang.String getTypeSignatureStr()
        Get the raw type signature string of the array class, e.g. "[[I" for "int[][]".
        Overrides:
        getTypeSignatureStr in class ClassInfo
        Returns:
        The raw type signature string of the array class.
      • getArrayTypeSignature

        public ArrayTypeSignature getArrayTypeSignature()
        Get the type signature of the class.
        Returns:
        The class type signature, if available, otherwise returns null.
      • getElementTypeSignature

        public TypeSignature getElementTypeSignature()
        Get the type signature of the array elements.
        Returns:
        The type signature of the array elements.
      • getNumDimensions

        public int getNumDimensions()
        Get the number of dimensions of the array.
        Returns:
        The number of dimensions of the array.
      • getElementClassInfo

        public ClassInfo getElementClassInfo()
        Get the ClassInfo instance for the array element type.
        Returns:
        the ClassInfo instance for the array element type. Returns null if the element type was not found during the scan. In particular, will return null for arrays that have a primitive element type.
      • loadElementClass

        public java.lang.Class<?> loadElementClass​(boolean ignoreExceptions)
        Get a Class<?> reference for the array element type. Causes the ClassLoader to load the element class, if it is not already loaded.
        Parameters:
        ignoreExceptions - Whether or not to ignore exceptions.
        Returns:
        a Class<?> reference for the array element type. Also works for arrays of primitive element type.
      • loadElementClass

        public java.lang.Class<?> loadElementClass()
        Get a Class<?> reference for the array element type. Causes the ClassLoader to load the element class, if it is not already loaded.
        Returns:
        a Class<?> reference for the array element type. Also works for arrays of primitive element type.
      • loadClass

        public java.lang.Class<?> loadClass​(boolean ignoreExceptions)
        Obtain a Class<?> reference for the array class named by this ArrayClassInfo object. Causes the ClassLoader to load the element class, if it is not already loaded.
        Overrides:
        loadClass in class ClassInfo
        Parameters:
        ignoreExceptions - Whether or not to ignore exceptions
        Returns:
        The class reference, or null, if ignoreExceptions is true and there was an exception or error loading the class.
        Throws:
        java.lang.IllegalArgumentException - if ignoreExceptions is false and there were problems loading the class.
      • loadClass

        public java.lang.Class<?> loadClass()
        Obtain a Class<?> reference for the array class named by this ArrayClassInfo object. Causes the ClassLoader to load the element class, if it is not already loaded.
        Overrides:
        loadClass in class ClassInfo
        Returns:
        The class reference.
        Throws:
        java.lang.IllegalArgumentException - if there were problems loading the class.
      • findReferencedClassInfo

        protected void findReferencedClassInfo​(java.util.Map<java.lang.String,​ClassInfo> classNameToClassInfo,
                                               java.util.Set<ClassInfo> refdClassInfo,
                                               LogNode log)
        Get ClassInfo objects for any classes referenced in the type descriptor or type signature.
        Overrides:
        findReferencedClassInfo in class ClassInfo
        Parameters:
        classNameToClassInfo - the map from class name to ClassInfo.
        refdClassInfo - the referenced class info
        log - the log
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from class: ClassInfo
        Use class name for equals().
        Overrides:
        equals in class ClassInfo
        Parameters:
        obj - the other object
        Returns:
        Whether the objects were equal.
      • hashCode

        public int hashCode()
        Description copied from class: ClassInfo
        Use hash code of class name.
        Overrides:
        hashCode in class ClassInfo
        Returns:
        the hashcode