Class ClassSource

    • Method Detail

      • from

        public static ClassSource from​(String className)
        Create a new ClassSource using the supplied className.
        Parameters:
        className - the Java class name; must not be null
      • from

        public static ClassSource from​(String className,
                                       FilePosition filePosition)
        Create a new ClassSource using the supplied className and filePosition.
        Parameters:
        className - the Java class name; must not be null
        filePosition - the position in the Java source file; may be null
      • from

        public static ClassSource from​(Class<?> javaClass)
        Create a new ClassSource using the supplied javaClass.
        Parameters:
        javaClass - the Java class; must not be null
      • from

        public static ClassSource from​(Class<?> javaClass,
                                       FilePosition filePosition)
        Create a new ClassSource using the supplied javaClass and filePosition.
        Parameters:
        javaClass - the Java class; must not be null
        filePosition - the position in the Java source file; may be null
      • getClassName

        public final String getClassName()
        Get the class name of this source.
        See Also:
        getPosition()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object