Class BinaryClass

  • All Implemented Interfaces:
    Constants, RuntimeConstants

    public final class BinaryClass
    extends ClassDefinition
    implements Constants
    WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
    • Field Detail

      • haveLoadedNested

        private boolean haveLoadedNested
      • basicCheckDone

        private boolean basicCheckDone
        Flags used by basicCheck() to avoid duplicate calls. (Part of fix for 4105911)
      • basicChecking

        private boolean basicChecking
    • Method Detail

      • basicCheck

        protected void basicCheck​(Environment env)
                           throws ClassNotFound
        Ready a BinaryClass for further checking. Note that, until recently, BinaryClass relied on the default basicCheck() provided by ClassDefinition. The definition here has been added to ensure that the information generated by collectInheritedMethods is available for BinaryClasses.
        Overrides:
        basicCheck in class ClassDefinition
        Throws:
        ClassNotFound
      • load

        public static BinaryClass load​(Environment env,
                                       java.io.DataInputStream in,
                                       int mask)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getMaxSupportedClassVersion

        private static int getMaxSupportedClassVersion()
      • loadNested

        public void loadNested​(Environment env)
        Called when an environment ties a binary definition to a declaration. At this point, auxiliary definitions may be loaded.
        Overrides:
        loadNested in class ClassDefinition
      • loadNested

        private void loadNested​(Environment env,
                                int flags)
      • initInnerClasses

        private void initInnerClasses​(Environment env,
                                      byte[] data,
                                      int flags)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • initInner

        private void initInner​(ClassDefinition outerClass,
                               int mods)
      • initOuter

        private void initOuter​(ClassDefinition innerClass,
                               int mods)
      • write

        public void write​(Environment env,
                          java.io.OutputStream out)
                   throws java.io.IOException
        Write the class out to a given stream. This function mirrors the loader.
        Throws:
        java.io.IOException
      • getAttribute

        public byte[] getAttribute​(Identifier name)
        Get a class attribute