Class MemoryByteCode

  • All Implemented Interfaces:
    java.io.Serializable, javax.tools.FileObject, javax.tools.JavaFileObject

    public class MemoryByteCode
    extends MemoryFile
    implements java.io.Serializable
    a representation of byte code in memory
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileObject

        javax.tools.JavaFileObject.Kind
    • Field Summary

      • Fields inherited from class javax.tools.SimpleJavaFileObject

        kind, uri
    • Constructor Summary

      Constructors 
      Constructor Description
      MemoryByteCode​(java.lang.String name)
      constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      byte[] getBytes()
      return byte code as byte sequence
      java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)
      get byte code content as character sequence
      java.lang.String getClassName()
      return the class name of this object
      int hashCode()  
      boolean isInnerClass()  
      java.io.InputStream openInputStream()
      open new input stream
      java.io.OutputStream openOutputStream()
      open new output stream
      • Methods inherited from class javax.tools.SimpleJavaFileObject

        delete, getAccessLevel, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openReader, openWriter, toString, toUri
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MemoryByteCode

        public MemoryByteCode​(java.lang.String name)
        constructor
        Parameters:
        name - class name
    • Method Detail

      • getCharContent

        public java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)
        get byte code content as character sequence
        Specified by:
        getCharContent in interface javax.tools.FileObject
        Overrides:
        getCharContent in class javax.tools.SimpleJavaFileObject
        Parameters:
        ignoreEncodingErrors - flag if encoding errors should be ignored
        Returns:
        character sequence of memory byte code
      • openOutputStream

        public java.io.OutputStream openOutputStream()
        open new output stream
        Specified by:
        openOutputStream in interface javax.tools.FileObject
        Overrides:
        openOutputStream in class javax.tools.SimpleJavaFileObject
        Returns:
        output stream
      • openInputStream

        public java.io.InputStream openInputStream()
        open new input stream
        Specified by:
        openInputStream in interface javax.tools.FileObject
        Overrides:
        openInputStream in class javax.tools.SimpleJavaFileObject
        Returns:
        input stream
      • getBytes

        public byte[] getBytes()
        return byte code as byte sequence
        Returns:
        byte array
      • getClassName

        public java.lang.String getClassName()
        return the class name of this object
        Returns:
        the class name
      • isInnerClass

        public boolean isInnerClass()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object