Class Cl

    • Field Detail

      • nameSpace

        public static int nameSpace
        The constant nameSpace.
    • Constructor Detail

      • Cl

        public Cl​(TreeItem parent,
                  boolean isInnerClass,
                  java.lang.String name,
                  java.lang.String superClass,
                  java.lang.String[] superInterfaces,
                  int modifiers,
                  ObfuscationConfig obfuscationConfig)
        Ctor.
        Parameters:
        parent - the parent
        isInnerClass - the is inner class
        name - the name
        superClass - the super class
        superInterfaces - the super interfaces
        modifiers - the modifiers
        obfuscationConfig - the obfuscation config
    • Method Detail

      • getAttributesToKeep

        public java.util.Set getAttributesToKeep()
        Gets attributes to keep.
        Returns:
        the attributes to keep
      • getClassResolver

        public static Cl.ClassResolver getClassResolver()
        Get class resolver class resolver.
        Returns:
        the class resolver
      • setPedantic

        public static void setPedantic​(boolean val)
        Set pedantic.
        Parameters:
        val - the val
      • setClassResolver

        public static void setClassResolver​(Cl.ClassResolver res)
        Set class resolver.
        Parameters:
        res - the res
      • getLineNumberTableMapper

        public LineNumberTableMapper getLineNumberTableMapper()
        Gets line number table mapper.
        Returns:
        the line number table mapper
      • setLineNumberTableMapper

        public void setLineNumberTableMapper​(LineNumberTableMapper lineNumberTableMapper)
        Sets line number table mapper.
        Parameters:
        lineNumberTableMapper - the line number table mapper
      • getSourceFileMapping

        public java.lang.String getSourceFileMapping()
        Gets source file mapping.
        Returns:
        the source file mapping
      • setSourceFileMapping

        public void setSourceFileMapping​(java.lang.String sourceFileMapping)
        Sets source file mapping.
        Parameters:
        sourceFileMapping - the source file mapping
      • isSourceFileMappingSet

        public boolean isSourceFileMappingSet()
        Is source file mapping set boolean.
        Returns:
        the boolean
      • getSuperClass

        public java.lang.String getSuperClass()
        Get super class string.
        Returns:
        the string
      • getInterfaces

        public java.lang.String[] getInterfaces()
        Get interfaces string [ ].
        Returns:
        the string [ ]
      • setInnerClassModifiers

        public void setInnerClassModifiers​(java.util.Map map)
        Set inner class modifiers.
        Parameters:
        map - the map
      • getInnerClassModifier

        public int getInnerClassModifier​(java.lang.String fqn)
        Get inner class modifier int.
        Parameters:
        fqn - the fqn
        Returns:
        the int
      • isInnerClass

        public boolean isInnerClass()
        Is this an inner class?
        Returns:
        the boolean
      • getMethod

        public Md getMethod​(java.lang.String name,
                            java.lang.String descriptor)
        Get a method by name.
        Parameters:
        name - the name
        descriptor - the descriptor
        Returns:
        the method
      • getField

        public Fd getField​(java.lang.String name)
        Get a field by name.
        Parameters:
        name - the name
        Returns:
        the field
      • getMethodEnum

        public java.util.Enumeration getMethodEnum()
        Get an Enumeration of methods.
        Returns:
        the method enum
      • getFieldEnum

        public java.util.Enumeration getFieldEnum()
        Get an Enumeration of fields.
        Returns:
        the field enum
      • isWildcardMatch

        public boolean isWildcardMatch​(java.lang.String pattern)
        Is this class's name a match to the wildcard pattern?
        Parameters:
        pattern - the pattern
        Returns:
        the boolean
      • isNRWildcardMatch

        public boolean isNRWildcardMatch​(java.lang.String pattern)
        Is this class's name a non-recursive match to the wildcard pattern?
        Parameters:
        pattern - the pattern
        Returns:
        the boolean
      • hasAsSuper

        public boolean hasAsSuper​(java.lang.String queryName)
                           throws java.lang.ClassNotFoundException
        Does this class have the specified class in its super chain?
        Parameters:
        queryName - the query name
        Returns:
        the boolean
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • addClass

        public Cl addClass​(java.lang.Object[] classInfo)
        Add an inner class.
        Specified by:
        addClass in class PkCl
        Parameters:
        classInfo - the class info
        Returns:
        the cl
      • addClass

        public Cl addClass​(Cl cl)
        Add an inner class, used when copying inner classes from a placeholder.
        Parameters:
        cl - the cl
        Returns:
        the cl
      • addPlaceholderClass

        public Cl addPlaceholderClass​(java.lang.String name)
        Add a placeholder class.
        Specified by:
        addPlaceholderClass in class PkCl
        Parameters:
        name - the name
        Returns:
        the cl
      • addMethod

        public Md addMethod​(MethodInfo methodInfo)
        Add a method.
        Parameters:
        methodInfo - the method info
        Returns:
        the md
      • addField

        public Fd addField​(FieldInfo fieldInfo)
        Add a field.
        Parameters:
        fieldInfo - the field info
        Returns:
        the fd
      • resetResolve

        public void resetResolve()
        Prepare for resolve of a class entry by resetting flags.
      • setupNameListDowns

        public void setupNameListDowns()
        Set up reverse list of reserved names prior to resolving classes.
      • resolveOptimally

        public void resolveOptimally()
                              throws java.lang.ClassNotFoundException
        Resolve a class entry - set obfuscation permissions based on super class and interfaces. Overload method and field names maximally.
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getMethodOutNameUp

        public java.lang.String getMethodOutNameUp​(java.lang.String name,
                                                   java.lang.String descriptor)
                                            throws java.lang.ClassNotFoundException
        Get output method name from list, or null if no mapping exists.
        Specified by:
        getMethodOutNameUp in interface NameListUp
        Parameters:
        name - the name
        descriptor - the descriptor
        Returns:
        the method out name up
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getMethodObfNameUp

        public java.lang.String getMethodObfNameUp​(java.lang.String name,
                                                   java.lang.String descriptor)
                                            throws java.lang.ClassNotFoundException
        Get obfuscated method name from list, or null if no mapping exists.
        Specified by:
        getMethodObfNameUp in interface NameListUp
        Parameters:
        name - the name
        descriptor - the descriptor
        Returns:
        the method obf name up
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getFieldOutNameUp

        public java.lang.String getFieldOutNameUp​(java.lang.String name)
                                           throws java.lang.ClassNotFoundException
        Get output field name from list, or null if no mapping exists.
        Specified by:
        getFieldOutNameUp in interface NameListUp
        Parameters:
        name - the name
        Returns:
        the field out name up
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getFieldObfNameUp

        public java.lang.String getFieldObfNameUp​(java.lang.String name)
                                           throws java.lang.ClassNotFoundException
        Get obfuscated field name from list, or null if no mapping exists.
        Specified by:
        getFieldObfNameUp in interface NameListUp
        Parameters:
        name - the name
        Returns:
        the field obf name up
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getMethodObfNameDown

        public java.lang.String getMethodObfNameDown​(Cl caller,
                                                     java.lang.String name,
                                                     java.lang.String descriptor)
                                              throws java.lang.ClassNotFoundException
        Is the method reserved because of its reservation down the class hierarchy?
        Specified by:
        getMethodObfNameDown in interface NameListDown
        Parameters:
        caller - the caller
        name - the name
        descriptor - the descriptor
        Returns:
        the method obf name down
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getFieldObfNameDown

        public java.lang.String getFieldObfNameDown​(Cl caller,
                                                    java.lang.String name)
                                             throws java.lang.ClassNotFoundException
        Is the field reserved because of its reservation down the class hierarchy?
        Specified by:
        getFieldObfNameDown in interface NameListDown
        Parameters:
        caller - the caller
        name - the name
        Returns:
        the field obf name down
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
      • getObfuscationConfig

        public ObfuscationConfig getObfuscationConfig()
        Gets obfuscation config.
        Returns:
        the obfuscation config