Class BytecodeChecker

  • All Implemented Interfaces:
    ClassChecker

    public class BytecodeChecker
    extends Object
    implements ClassChecker
    a private class which can be used to derive the super and interfaces of a class from its defining bytecode
    • Constructor Detail

      • BytecodeChecker

        public BytecodeChecker​(byte[] buffer)
    • Method Detail

      • isInterface

        public boolean isInterface()
        Description copied from interface: ClassChecker
        see if the checked class is an interface or really a class
        Specified by:
        isInterface in interface ClassChecker
        Returns:
        true if the checked class is an interface and false if it is really a class
      • getSuper

        public String getSuper()
        Description copied from interface: ClassChecker
        identify the name of the super class for the checked class
        Specified by:
        getSuper in interface ClassChecker
        Returns:
        the name of the super class for the checked class
      • hasOuterClass

        public boolean hasOuterClass()
        Description copied from interface: ClassChecker
        identify if the checked class is embedded in an outer class
        Specified by:
        hasOuterClass in interface ClassChecker
        Returns:
        true if the checked class is embedded in an outer class otherwise false
      • getInterfaceCount

        public int getInterfaceCount()
        Description copied from interface: ClassChecker
        identify how many interfaces are in the implements list of this class
        Specified by:
        getInterfaceCount in interface ClassChecker
        Returns:
        how many interfaces are in the implements list of this class
      • getInterface

        public String getInterface​(int idx)
        Description copied from interface: ClassChecker
        identify the name of a specific interface in the implements list of this class
        Specified by:
        getInterface in interface ClassChecker
        Parameters:
        idx - the index of the interface in the list
        Returns:
        the name of a specific interface in the implements list of this class
      • getBytesize

        public int getBytesize()