Class JavaClass

  • All Implemented Interfaces:
    java.lang.Comparable<JavaClass>

    class JavaClass
    extends java.lang.Object
    implements java.lang.Comparable<JavaClass>
    This class represents a Java class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.lang.String> dependencies  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaClass​(java.lang.String filename, java.io.InputStream is)
      Read class definition from an input stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(JavaClass rhs)  
      (package private) java.util.Set<java.lang.String> getDependencies()  
      java.lang.String getName()
      Get the the qualified name of the class.
      java.lang.String getPackageName()
      Get the the qualified name of the Java package the class belongs to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
      • dependencies

        private final java.util.Set<java.lang.String> dependencies
    • Constructor Detail

      • JavaClass

        public JavaClass​(java.lang.String filename,
                         java.io.InputStream is)
                  throws java.io.IOException
        Read class definition from an input stream.
        Parameters:
        filename - the name of the class file (used to determine the class name)
        is - the input stream to read the class file from
        Throws:
        java.io.IOException - if I/O exception occurs while reading from the input stream
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the the qualified name of the class.
        Returns:
        the qualified name of the class.
      • getPackageName

        public java.lang.String getPackageName()
        Get the the qualified name of the Java package the class belongs to.
        Returns:
        the qualified name of the Java package the class belongs to.
      • compareTo

        public int compareTo​(JavaClass rhs)
        Specified by:
        compareTo in interface java.lang.Comparable<JavaClass>
      • getDependencies

        java.util.Set<java.lang.String> getDependencies()