Class ParsedFile

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    JavaDocHTMLFile

    public abstract class ParsedFile
    extends java.lang.Object
    implements java.io.Serializable
    Parent-class of JavaDocHTMLFile and the source-code parsing classes.

    This class is abstract and there are two primary classes which extend it. This class is designed to hold all of the information - in java.lang.String format - about a Java class, interface or enumerated type. This information generally includes lists of fields, methods and constructor declarations. This class accepts String's (in its constructor) from the two classes which extend it. Those String's are found by the JavaParser Tool.

    The easiest way to think about this is that this is a (tremendously) pared down version of the JavaParser Library, that holds the essential information need to HiLite & Update a JavaDoc Web-Page using this Upgrade Tool. The standard Java Reflection API, inside Java Package java.lang.reflect.* is capable of supplying all of the method, constructor and field names (and parameters) for just about any Java Class. However, what the Reflect API cannot supply are Method Bodies & Constructor Bodies as instances of java.lang.String. These are required so that they may be syntax hilited by the hiliter, and that's what makes the Java Parser Library JAR necessary.

    This class serves as the root-class for both parsed Java-Doc HTML Pages, and parsed Java Source-Code '.java' pages.
    See Also:
    Serialized Form


    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final long serialVersionUID = 1;
        
      • annotationsMirror

        🡅  🡇     🗕  🗗  🗖
        protected Torello.JDUInternal.DataClasses.MainLoopData.AnnotationsMirror annotationsMirror
        Stores information provided by the JavaDoc Upgrader Annotations. Note, this Annotation Mirror does not contain information about any / all annotations used inside of Java Source Code Files, but rather only the ones created by this API.

        These include @StaticFunctional and also @JDHeaderBackgroundImg
      • javaSrcFileAsStr

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String javaSrcFileAsStr
        This field simply contains the entire contents of the '.java' Source-Code File from whence this ParsedFile instance originated.

        Note that for in for the sub-class JavaDocHTMLFile, when the HTML file which was parsed represents an inner-class / nested-type, this field will still contain the entire contents of the top-level enclosing java type (as a String) in this field.

        For instance, if a JavaDocHTMLFile (which inherits this class, ParsedFile) instance had been generated for the Java-HTML inner-class Torello.HTML.Attributes.Filter, which happens to be a nested type of class Torello.HTML.Attributes, this field would contain the text-characters of the Source-File Torello/HTML/Attributes.java in String-format (as character data).
      • name

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String name
        Holds the name. A 'ParsedFile' represents a class, interface, or enumerated-type. This name is NOT the fully-qualified (package-included) name, and it will have any Generic Type Parameters appended, if this CIET represents a generic that has type-parameters.

        If this CIET is an inner-class, the containing CIET name is included in this String field.

        For Instance:

        Input CIET 'name' Field Value
        interface java.lang.Integer "Integer"
        class java.util.Vector<E> "Vector<E>"
        class java.util.Base64.Decoder "Base.Decoder"
        interface java.util.Map.Entry<K, V> "Map.Entry<K, V>"
        See Also:
        simpleName, fullyQualifiedName
        Code:
        Exact Field Declaration Expression:
         public final String name;
        
      • fullyQualifiedName

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String fullyQualifiedName
        This holds the fully qualified CIET name - which means that package and containing class information is included. If thi CIET is a Java Generic that happens to have Generic Type Parameters (the 'E' in Vector<E>, this name WILL NOT include that text.

        For Instance:
        Input CIET 'fullyQualifiedName' Field Value
        interface java.lang.Integer "java.lang.Integer"
        class java.util.Vector<E> "java.util.Vector"
        class java.util.Base64.Decoder "java.util.Base64.Decoder"
        interface java.util.Map.Entry<K, V> "java.util.Map.Entry"
        See Also:
        simpleName, name
        Code:
        Exact Field Declaration Expression:
         public final String fullyQualifiedName;
        
      • simpleName

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String simpleName
        This the same as the name parameter, but leaves off both the type-parameters, and the fully-qualified package-name String's. If this CIET is an inner class the containing CIET name is included in this String field. See the table below, for details:
        Input CIET'simpleName' Field Value
        interface java.lang.Integer"Integer"
        class java.util.Vector<E>"Vector"
        class java.util.Base64.Decoder"Base64.Decoder"
        interface java.util.Map.Entry<K, V>"Map.Entry"
        See Also:
        name, fullyQualifiedName
        Code:
        Exact Field Declaration Expression:
         public final String simpleName;
        
      • packageName

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String packageName
        Holds the package-name. If this ParsedFile were for class java.lang.String the 'packageName' would be 'java.lang'.
      • ciet

        🡅  🡇     🗕  🗗  🗖
        public final CIET ciet
        The acronym 'CIET' simply means "Class, Interface or Enumerated-Type. This public field identifies whether this ParsedFile is for a class, an interface or an enumerated-type.
      • isInner

        🡅  🡇     🗕  🗗  🗖
        public final boolean isInner
        This identifies inner classes and interfaces.
        'isInner' Field Value Input CIET
        false interface java.lang.Integer
        false class java.util.Vector<E>
        true class java.util.Base64.Decoder
        true interface java.util.Map.Entry<K, V>
      • containerClasses

        🡅  🡇     🗕  🗗  🗖
        protected final java.lang.String[] containerClasses
        This identifies inner classes and interfaces. For any class that is not an inner class, this will be a zero-length String[] array.
        'containerClasses' Value Input CIET
        { } interface java.lang.Integer
        { } class java.util.Vector<E>
        { "Base64" } class java.util.Base64.Decoder
        { "Map" } interface java.util.Map.Entry<K, V>
        See Also:
        getContainerClasses()
        Code:
        Exact Field Declaration Expression:
         protected final String[] containerClasses;
        
      • genericParameters

        🡅  🡇     🗕  🗗  🗖
        protected final ReadOnlyList<java.lang.String> genericParameters
        If this represents a Java Generic Class or Interface, with generic type information, the generic type parameters shall be saved here.
        See Also:
        getGenericParameters()
        Code:
        Exact Field Declaration Expression:
         protected final ReadOnlyList<String> genericParameters;
        
      • startLineNumber

        🡅  🡇     🗕  🗗  🗖
        public final int startLineNumber
        The line-number in the source-code file where this class definition actually begins.

        Note that if this instance of ParsedFile is representing a Nessted-Type / Inner-Class, then this field will contain the line-number where that inner-type's definition begins inside the Enclosing-Class' '.java' file.
      • endLineNumber

        🡅  🡇     🗕  🗗  🗖
        public final int endLineNumber
        The line-number in the source-code file where this class definition ends. Often this will just be the line-number of the last line in the '.java' file.

        If this is a Nested-Type, this field will contain the line-number where the definition of the Nested-type ends.
      • jdStartLineNumber

        🡅  🡇     🗕  🗗  🗖
        public final int jdStartLineNumber
        The starting line-number of the JavaDoc Comment at the top of the class. If this class does not have a Java-Doc Comment, this field will contain -1.
      • jdEndLineNumber

        🡅  🡇     🗕  🗗  🗖
        public final int jdEndLineNumber
        The endiing line-number of the JavaDoc Comment at the top of the class. If this class does not have a Java-Doc Comment, this field will contain -1.
      • typeLineCount

        🡅  🡇     🗕  🗗  🗖
        public final int typeLineCount
        The number of lines of Source-Code inside this '.java' File. If this instance of ParsedFile represents an Inner-Type (Nested-Class), then this field will contain a value that corresponds only to the number of lines used by the Nested-Type within the context of the entire Enclosing-Class '.java' file.
      • typeSizeChars

        🡅  🡇     🗕  🗗  🗖
        public final int typeSizeChars
        The number of characters / bytes of Source-Code inside this '.java' File. If this instance of ParsedFile represents an Inner-Type (Nested-Class), then this field will contain a value that corresponds only to the number of characters / bytes used by the Nested-Type within the context of the entire Enclosing-Class '.java' file.
      • annotationElems

        🡅  🡇     🗕  🗗  🗖
        protected final java.util.Vector<AnnotationElem> annotationElems
        This is the list of AnnotationElem instances identified by the parser for this ParsedFile

        IMPORTANT: The vast majority of source-files will not contain any AnnotationElem's. Unless the source-file used to build 'this' was an annotation it would simply not be possible to define an AnnotationElem for the annotation
      • enumConstants

        🡅  🡇     🗕  🗗  🗖
        protected final java.util.Vector<EnumConstant> enumConstants
        This is the list of EnumConstant instances identified by the parser for this ParsedFile

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        See Also:
        enumConstants
        Code:
        Exact Field Declaration Expression:
         protected final Vector<EnumConstant> enumConstants = new Vector<>();
        
    • Constructor Detail

      • ParsedFile

        🡅  🡇     🗕  🗗  🗖
        protected ParsedFile​(java.lang.String fileName,
                             java.lang.String name,
                             java.lang.String packageName,
                             CIET ciet,
                             ReadOnlyList<java.lang.String> genericParameters,
                             java.lang.String fullyQualifiedName,
                             int startLineNumber,
                             int endLineNumber,
                             int jdStartLineNumber,
                             int jdEndLineNumber,
                             int typeLineCount,
                             int typeSizeChars,
                             java.lang.String javaSrcFileAsStr)
        Subclasses of 'ParsedFile' should use this constructor to initialize these fields.

        Used by both JavaDocHTMLFile and JavaSourceCodeFile
    • Method Detail

      • getContainerClasses

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String[] getContainerClasses()
        Returns the container classes (if any) for this class, interface, etc.
        Returns:
        The list of container classes, from outer to inner, for this class. If this is a normal class that is not an inner class, this will return an empty (zero-lengh) String[] array.
        See Also:
        containerClasses
        Code:
        Exact Method Body:
         return (containerClasses.length > 0)
             ? containerClasses.clone()
             : StringParse.EMPTY_STR_ARRAY;
        
      • getGenericParameters

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String[] getGenericParameters()
        Returns the generic type parameters (if any) for this class or interface
        Returns:
        The generic type parameters as a String[] array. If this class is not a Java Generic, a zero-length String[] array will be returned.
        See Also:
        genericParameters
        Code:
        Exact Method Body:
         return genericParameters.toArray(new String[genericParameters.size()]);
        
      • addMethod

        🡅  🡇     🗕  🗗  🗖
        protected final void addMethod​(Method m)
        Inserts another Method into the internal methods Vector. Both of the inheriting subclasses of this class use this method to build a list of methods for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.
        Parameters:
        m - Method to insert into the list of methods. Internally, the order in which these Method's are inserted is preserved. The internal data-structure used is Vector<Method>
        See Also:
        methods
        Code:
        Exact Method Body:
         methods.add(m);
        
      • getMethod

        🡅  🡇     🗕  🗗  🗖
        public Method getMethod​(int i)
        This will retrieve the ith Method that was defined in the original source-code ('.java') or documentation ('.html') file.
        Parameters:
        i - Index into the methods Vector
        Returns:
        The ith element of the methods Vector, as an instance of Method
        See Also:
        methods
        Code:
        Exact Method Body:
         return methods.elementAt(i);
        
      • getMethods

        🡅  🡇     🗕  🗗  🗖
        public Method[] getMethods()
        Retrieves the complete list of Method's that were defined in the original source-code ('.java') or documentation ('.html') file.
        Returns:
        A copy of the contents of the internal methods Vector, as an array
        See Also:
        methods
        Code:
        Exact Method Body:
         return methods.toArray(new Method[methods.size()]);
        
      • getMethods

        🡅  🡇     🗕  🗗  🗖
        public void getMethods​
                    (java.util.function.Consumer<Method> acceptMethodConsumer)
        
        Iterates the contents of the methods Vector, and sends each Method to a user-provided java.util.function.Consumer<Method>
        Parameters:
        acceptMethodConsumer - Any user-provided Consumer
        See Also:
        methods
        Code:
        Exact Method Body:
         methods.forEach((Method method) -> acceptMethodConsumer.accept(method));
        
      • addConstructor

        🡅  🡇     🗕  🗗  🗖
        protected final void addConstructor​(Constructor c)
        Inserts another Constructor into the internal constructors Vector. Both of the inheriting subclasses of this class use this method to build a list of constructors for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.
        Parameters:
        c - Constructor to insert into the list of constructors. Internally, the order in which these Constructor's are inserted is preserved. The internal data-structure used is Vector<Constructor>
        See Also:
        constructors
        Code:
        Exact Method Body:
         constructors.add(c);
        
      • getConstructors

        🡅  🡇     🗕  🗗  🗖
        public void getConstructors​
                    (java.util.function.Consumer<Constructor> acceptConstructorConsumer)
        
        Iterates the contents of the constructors Vector, and sends each Constructor to a user-provided java.util.function.Consumer<Constructor>
        Parameters:
        acceptConstructorConsumer - Any user-provided Consumer
        See Also:
        constructors
        Code:
        Exact Method Body:
         constructors.forEach
             ((Constructor constructor) -> acceptConstructorConsumer.accept(constructor));
        
      • addField

        🡅  🡇     🗕  🗗  🗖
        protected final void addField​(Field f)
        Inserts another Field into the internal fields Vector. Both of the inheriting subclasses of this class use this method to build a list of fields for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.
        Parameters:
        f - Field to insert into the list of fields. Internally, the order in which these Field's are inserted is preserved. The internal data-structure used is Vector<Field>
        See Also:
        fields
        Code:
        Exact Method Body:
         fields.add(f);
        
      • numFields

        🡅  🡇     🗕  🗗  🗖
        public int numFields()
        Returns the number of Field's that were successfully parsed by whichever parser was used.
        Returns:
        The number of Field's in this class' internally stored fields Vector.
        See Also:
        fields
        Code:
        Exact Method Body:
         return fields.size();
        
      • getField

        🡅  🡇     🗕  🗗  🗖
        public Field getField​(int i)
        This will retrieve the ith Field that was defined in the original source-code ('.java') or documentation ('.html') file.
        Parameters:
        i - Index into the fields Vector
        Returns:
        The ith element of the fields Vector, as an instance of Field
        See Also:
        fields
        Code:
        Exact Method Body:
         return fields.elementAt(i);
        
      • getFields

        🡅  🡇     🗕  🗗  🗖
        public Field[] getFields()
        Retrieves the complete list of Field's that were defined in the original source-code ('.java') or documentation ('.html') file.
        Returns:
        A copy of the contents of the internal fields Vector, as an array
        See Also:
        fields
        Code:
        Exact Method Body:
         return fields.toArray(new Field[fields.size()]);
        
      • getFields

        🡅  🡇     🗕  🗗  🗖
        public void getFields​
                    (java.util.function.Consumer<Field> acceptFieldConsumer)
        
        Iterates the contents of the fields Vector, and sends each Field to a user-provided java.util.function.Consumer<Field>
        Parameters:
        acceptFieldConsumer - Any user-provided Consumer
        See Also:
        fields
        Code:
        Exact Method Body:
         fields.forEach((Field field) -> acceptFieldConsumer.accept(field));
        
      • addAnnotationElem

        🡅  🡇     🗕  🗗  🗖
        protected final void addAnnotationElem​(AnnotationElem ae)
        Inserts another AnnotationElem into the internal annotationElems Vector. Both of the inheriting subclasses of this class use this method to build a list of annotationElems for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.
        Parameters:
        ae - AnnotationElem to insert into the list of annotationElems. Internally, the order in which these AnnotationElem's are inserted is preserved. The internal data-structure used is Vector<AnnotationElem>
        See Also:
        annotationElems
        Code:
        Exact Method Body:
         annotationElems.add(ae);
        
      • getAnnotationElems

        🡅  🡇     🗕  🗗  🗖
        public AnnotationElem[] getAnnotationElems()
        Retrieves the complete list of AnnotationElem's that were defined in the original source-code ('.java') or documentation ('.html') file.

        IMPORTANT: The vast majority of source-files will not contain any AnnotationElem's. Unless the source-file used to build 'this' was an annotation it would simply not be possible to define an AnnotationElem for the annotation
        Returns:
        A copy of the contents of the internal annotationElems Vector, as an array
        See Also:
        annotationElems
        Code:
        Exact Method Body:
         return annotationElems.toArray(new AnnotationElem[annotationElems.size()]);
        
      • getAnnotationElems

        🡅  🡇     🗕  🗗  🗖
        public void getAnnotationElems​
                    (java.util.function.Consumer<AnnotationElem> acceptAEConsumer)
        
        Iterates the contents of the annotationElems Vector, and sends each AnnotationElem to a user-provided java.util.function.Consumer<AnnotationElem>

        IMPORTANT: The vast majority of source-files will not contain any AnnotationElem's. Unless the source-file used to build 'this' was an annotation it would simply not be possible to define an AnnotationElem for the annotation
        Parameters:
        acceptAEConsumer - Any user-provided Consumer
        See Also:
        annotationElems
        Code:
        Exact Method Body:
         annotationElems.forEach((AnnotationElem elem) -> acceptAEConsumer.accept(elem));
        
      • addEnumConstant

        🡅  🡇     🗕  🗗  🗖
        protected final void addEnumConstant​(EnumConstant ec)
        Inserts another EnumConstant into the internal enumConstants Vector. Both of the inheriting subclasses of this class use this method to build a list of enumConstants for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Parameters:
        ec - EnumConstant to insert into the list of enumConstants. Internally, the order in which these EnumConstant's are inserted is preserved. The internal data-structure used is Vector<EnumConstant>
        See Also:
        enumConstants
        Code:
        Exact Method Body:
         enumConstants.add(ec);
        
      • numEnumConstants

        🡅  🡇     🗕  🗗  🗖
        public int numEnumConstants()
        Returns the number of EnumConstant's that were successfully parsed by whichever parser was used.

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Returns:
        The number of EnumConstant's in this class' internally stored enumConstants Vector.
        See Also:
        enumConstants
        Code:
        Exact Method Body:
         return enumConstants.size();
        
      • getEnumConstant

        🡅  🡇     🗕  🗗  🗖
        public EnumConstant getEnumConstant​(int i)
        This will retrieve the ith EnumConstant that was defined in the original source-code ('.java') or documentation ('.html') file.

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Parameters:
        i - Index into the enumConstants Vector
        Returns:
        The ith element of the enumConstants Vector, as an instance of EnumConstant
        See Also:
        enumConstants
        Code:
        Exact Method Body:
         return enumConstants.elementAt(i);
        
      • getEnumConstants

        🡅  🡇     🗕  🗗  🗖
        public EnumConstant[] getEnumConstants()
        Retrieves the complete list of EnumConstant's that were defined in the original source-code ('.java') or documentation ('.html') file.

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Returns:
        A copy of the contents of the internal enumConstants Vector, as an array
        See Also:
        enumConstants
        Code:
        Exact Method Body:
         return enumConstants.toArray(new EnumConstant[enumConstants.size()]);
        
      • getEnumConstants

        🡅  🡇     🗕  🗗  🗖
        public void getEnumConstants​
                    (java.util.function.Consumer<EnumConstant> acceptECConsumer)
        
        Iterates the contents of the enumConstants Vector, and sends each EnumConstant to a user-provided java.util.function.Consumer<EnumConstant>

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Parameters:
        acceptECConsumer - Any user-provided Consumer
        See Also:
        enumConstants
        Code:
        Exact Method Body:
         enumConstants.forEach((EnumConstant elem) -> acceptECConsumer.accept(elem));
        
      • addNestedType

        🡅  🡇     🗕  🗗  🗖
        protected final void addNestedType​(NestedType nt)
        Inserts another NestedType into the internal nestedTypes Vector. Both of the inheriting subclasses of this class use this method to build a list of nestedTypes for EITHER a particular '.java' source-file OR a '.html' Java Doc Web-Page.
        Parameters:
        nt - NestedType to insert into the list of nestedTypes. Internally, the order in which these NestedType's are inserted is preserved. The internal data-structure used is Vector<NestedType>
        See Also:
        nestedTypes
        Code:
        Exact Method Body:
         nestedTypes.add(nt);
        
      • getNestedTypes

        🡅  🡇     🗕  🗗  🗖
        public Method[] getNestedTypes()
        Retrieves the complete list of NestedType's that were defined in the original source-code ('.java') or documentation ('.html') file.
        Returns:
        A copy of the contents of the internal nestedTypes Vector, as an array
        See Also:
        nestedTypes
        Code:
        Exact Method Body:
         return methods.toArray(new Method[methods.size()]);
        
      • getNestedTypes

        🡅  🡇     🗕  🗗  🗖
        public void getNestedTypes​
                    (java.util.function.Consumer<NestedType> acceptNTConsumer)
        
        Iterates the contents of the nestedTypes Vector, and sends each NestedType to a user-provided java.util.function.Consumer<NestedType>
        Parameters:
        acceptNTConsumer - Any user-provided Consumer
        See Also:
        nestedTypes
        Code:
        Exact Method Body:
         nestedTypes.forEach((NestedType type) -> acceptNTConsumer.accept(type));
        
      • findMethod

        🡅  🡇     🗕  🗗  🗖
        public Method findMethod​
                    (Torello.JDUInternal.DataClasses.MainLoopData.CallableSignature cSig)
        
        Finds a Method having the characteristics specified by parameter 'cSig'.
        Parameters:
        cSig - An internally generated representation of a Java-Method extrapolated from the information available on a Java-Doc HTML Detail Section
        Returns:
        A method that matches the requested Method-Signature
        Code:
        Exact Method Body:
         for (Method method : methods)
        
             if (    method.name.equals(cSig.name)
                 &&  method.returnTypeJOW.equals(cSig.returnTypeJOW)
                 &&  method.nearlyEqualsCallableSig(cSig)
             )
                 return method;
        
         return null;
        
      • findConstructor

        🡅  🡇     🗕  🗗  🗖
        public Constructor findConstructor​
                    (Torello.JDUInternal.DataClasses.MainLoopData.CallableSignature cSig)
        
        Finds a Constructor having the characteristics specified by parameter 'cSig'.
        Parameters:
        cSig - An internally generated representation of a Java-Constructor extrapolated from the information available on a Java-Doc HTML Detail Section
        Returns:
        A Constructor that matches the requested Constructor-Signature
        Code:
        Exact Method Body:
         for (Constructor ctor : constructors) if (ctor.nearlyEqualsCallableSig(cSig)) return ctor;
         return null;
        
      • findMethods

        🡅  🡇     🗕  🗗  🗖
        public java.util.stream.Stream<MethodfindMethods​
                    (java.lang.String methodName)
        
        Returns all internally-stored Method instances whose Method#name field matches 'name'
        Parameters:
        methodName - The name of the Method
        Returns:
        An instance of Stream<Method>of all Method's named 'name'
        See Also:
        methods, Declaration.name
        Code:
        Exact Method Body:
         Stream.Builder<Method> b = Stream.builder();
         for (Method method : methods) if (method.name.equals(methodName)) b.accept(method);
         return b.build();
        
      • findConstructors

        🡅  🡇     🗕  🗗  🗖
        public java.util.stream.Stream<ConstructorfindConstructors​
                    (int numParameters)
        
        Returns all internally-stored Constructor instances for instances whose accepted parameters-list has a length equal to numParameters.
        Parameters:
        numParameters - The number of parameters accepted by the Constructor being searched.
        Returns:
        An instance of Stream<Constructor> containing all Constructor's whose number of parameterss equals 'numParameters'
        See Also:
        constructors, Callable.numParameters()
        Code:
        Exact Method Body:
         Stream.Builder<Constructor> b = Stream.builder();
        
         for (Constructor constructor : constructors)
             if (constructor.numParameters() == numParameters)
                 b.accept(constructor);
        
         return b.build();
        
      • findField

        🡅  🡇     🗕  🗗  🗖
        public Field findField​(java.lang.String name)
        Returns the internally-stored Field instance whose name matches parameter 'name'
        Parameters:
        name - The name of the Field
        Returns:
        The Field whose name matches parameter 'name'. If there is no such Field with that name defined in this parsed-file, then null is returned.
        See Also:
        Declaration.name, fields
        Code:
        Exact Method Body:
         for (Field field : fields) if (field.name.equals(name)) return field;
         return null;
        
      • findAnnotationElem

        🡅  🡇     🗕  🗗  🗖
        public AnnotationElem findAnnotationElem​(java.lang.String name)
        Returns the internally-stored AnnotationElem instance whose name matches parameter 'name'

        IMPORTANT: The vast majority of source-files will not contain any AnnotationElem's. Unless the source-file used to build 'this' was an annotation it would simply not be possible to define an AnnotationElem for the annotation
        Parameters:
        name - The name of the AnnotationElem
        Returns:
        The AnnotationElem whose name matches parameter 'name'. If there is no such AnnotationElem with that name defined in this parsed-file, then null is returned.
        See Also:
        Declaration.name, annotationElems
        Code:
        Exact Method Body:
         for (AnnotationElem ae : annotationElems) if (ae.name.equals(name)) return ae;
         return null;
        
      • findEnumConstant

        🡅  🡇     🗕  🗗  🗖
        public EnumConstant findEnumConstant​(java.lang.String name)
        Returns the internally-stored EnumConstant instance whose name matches parameter 'name'

        IMPORTANT: The vast majority of source-files will not contain any EnumConstant's. Unless the source-file used to build 'this' was an enum it would simply not be possible to define an EnumConstant for the enum
        Parameters:
        name - The name of the EnumConstant
        Returns:
        The EnumConstant whose name matches parameter 'name'. If there is no such EnumConstant with that name defined in this parsed-file, then null is returned.
        See Also:
        Declaration.name, enumConstants
        Code:
        Exact Method Body:
         for (EnumConstant ec : enumConstants) if (ec.name.equals(name)) return ec;
         return null;
        
      • findNestedType

        🡅  🡇     🗕  🗗  🗖
        public NestedType findNestedType​(java.lang.String name)
        Returns the internally-stored NestedType instance whose name matches parameter 'name'
        Parameters:
        name - The name of the NestedType
        Returns:
        The NestedType whose name matches parameter 'name'. If there is no such NestedType with that name defined in this parsed-file, then null is returned.
        See Also:
        Declaration.name, nestedTypes
        Code:
        Exact Method Body:
         for (NestedType nt : nestedTypes) if (nt.name.equals(name)) return nt;
         return null;
        
      • toString

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String toString()
        Turns a ParsedFile result object, 'this', into a String. Passes '0' to the standard flags-print method.
        Overrides:
        toString in class java.lang.Object
        Code:
        Exact Method Body:
         return toString(0);
        
      • toString

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String toString​(int flags)
        Turns a ParsedFile result object, 'this', into a java.lang.String.

        This will check for the 'UNIX_COLORS' flag in class PF. If this flag is identified, then a few unix color codes are added to the output.

        IMPORTANT NOTE: The value of this flag will be propagated to the individual toString(int flag) methods in each of the Method, Field, Constructor etc... - toString(flag) methods.
        Returns:
        This returns a String that obeys the flag-requests by parameter flag.
        See Also:
        Method.toString(int), Constructor.toString(int), Field.toString(int)
        Code:
        Exact Method Body:
         StringBuilder   sb  = new StringBuilder();
         boolean         c   = (flags & PF.UNIX_COLORS) > 0;
        
         StringBuilder typeParamsSB = new StringBuilder();
         for (String p : genericParameters) typeParamsSB.append(p + ", ");
        
         String typeParamsStr = (typeParamsSB.length() > 0)
             ? typeParamsSB.subSequence(0, typeParamsSB.length() - 1).toString()
             : "-";
        
         StringBuilder containerClassesSB = new StringBuilder();
         for (String p : containerClasses) containerClassesSB.append(p + ", ");
        
         String containerClassesStr = (containerClassesSB.length() > 0)
             ? containerClassesSB.subSequence(0, containerClassesSB.length() - 1).toString()
             : "-";
            
         sb.append(
             "******************************************************************\n" +
             "Fields in this 'ParsedFile' instance:\n"                              +
             "******************************************************************\n" +
             "fileName:             " + fileName + '\n' +
             "name:                 " + name + '\n' +
             "CIET:                 " + ciet + '\n' +
             "packageName:          " + packageName + '\n' +
             "simpleName:           " + simpleName + '\n' +
             "fullyQualifedName:    " + fullyQualifiedName + '\n' +
             "isGeneric:            " + isGeneric + '\n' +
             "Type Parameters:      " + typeParamsStr + '\n' +
             "isInner:              " + isInner + '\n' +
             "Container Classes:    " + containerClassesStr + "\n\n"
         );
        
         if (methods.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Methods:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (Method m : methods) sb.append(m.toString(flags) + "\n\n");
         }
        
         if (constructors.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Constructors:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (Constructor cs : constructors)  sb.append(cs.toString(flags) + "\n\n");
         }
        
         if (fields.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Fields:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (Field f : fields) sb.append(f.toString(flags) + "\n\n");
         }
        
         if (annotationElems.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Annotation-Elements:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (AnnotationElem ae : annotationElems) sb.append(ae.toString(flags) + "\n\n");
         }
        
         if (enumConstants.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Enumerated Constants:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (EnumConstant ec : enumConstants) sb.append(ec.toString(flags) + "\n\n");
         }
        
         if (nestedTypes.size() > 0)
         {
             sb.append(  "******************************************************************\n" + 
                         (c ? BRED : "") + "Nested Types:\n" + (c ? RESET : "") +
                         "******************************************************************\n"  );
        
             for (NestedType nt : nestedTypes) sb.append(nt.toString(flags) + "\n\n");
         }
        
         return sb.toString();
        
      • quickSummary

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String quickSummary()
        Provides a Quick Summary for this file.
        Returns:
        The summary as a java.lang.String. Nothing is actually printed by this method.
        Code:
        Exact Method Body:
         String typeParams = (genericParameters.size() == 0)
             ? ""
             : ("Generic Type-Parameters: " + 
                 StrCSV.toCSV(getGenericParameters(), true, true, null) + '\n');
        
         String ae = (annotationElems.size() == 0)
             ? ""
             : (", [" + BBLUE + StringParse.zeroPad(annotationElems.size()) + RESET +
                 "] Annotation-Elements");
        
         String ec = (enumConstants.size() == 0)
             ? ""
             : (", [" + BBLUE + StringParse.zeroPad(enumConstants.size()) + RESET +
                 "] Enum-Constants");
        
         String nt = (nestedTypes.size() == 0)
             ? ""
             : (", [" + BBLUE + StringParse.zeroPad(nestedTypes.size()) + RESET +
                 "] Nested-Types");
            
         return
             "Name ["        + BYELLOW + name                  + RESET + "], " + 
             "Package ["     + BYELLOW + packageName           + RESET + "], " +
             "CIET ["        + BYELLOW + ciet                  + RESET + "]\n" +
             "Qualified ["   + BYELLOW + fullyQualifiedName    + RESET + "], " +
             "Simple ["      + BYELLOW + simpleName            + RESET + "]\n" +
             typeParams +
             '[' + BBLUE + StringParse.zeroPad(fields.size())          + RESET + "] Fields, " +
             '[' + BBLUE + StringParse.zeroPad(constructors.size())    + RESET + "] Constructors, " +
             '[' + BBLUE + StringParse.zeroPad(methods.size())         + RESET + "] Methods" +
             ae + ec + nt + '\n';
        
      • abbreviatedSummary

        🡅     🗕  🗗  🗖
        public java.lang.String abbreviatedSummary​(int lineWidth)
        Provides a Vertical-List Abbreviated Summary for this file.
        Parameters:
        lineWidth - The number of characters wide the member-summary lines should be.
        Returns:
        The summary as a java.lang.String. Nothing is actually printed by this method.
        Code:
        Exact Method Body:
         String typeParams = (genericParameters.size() == 0)
             ? ""
             : ("Generic Type-Parameters: " + 
                 StrCSV.toCSV(getGenericParameters(), true, true, null) + '\n');
        
         String m = (methods.size() == 0)
             ? "Methods: *NONE*\n"
             : ("Methods:" + StrPrint.printListAbbrev
                 (methods, lineWidth, 4, false, true, true) + '\n');
        
         String f = (fields.size() == 0)
             ? "Fields: *NONE*\n"
             : ("Fields:" + StrPrint.printListAbbrev
                 (fields, lineWidth, 4, false, true, true) + '\n');
        
         String c = (constructors.size() == 0)
             ? "Constructors: *NONE*\n"
             : ("Constructors:" + StrPrint.printListAbbrev
                 (constructors, lineWidth, 4, false, true, true) + '\n');
            
         String ec = (enumConstants.size() == 0)
             ? ""
             : ("Enum-Constants:" + StrPrint.printListAbbrev
                 (enumConstants, lineWidth, 4, false, true, true) + '\n');
            
         String ae = (annotationElems.size() == 0)
             ? ""
             : ("Annotation-Elements:" + StrPrint.printListAbbrev
                 (annotationElems, lineWidth, 4, false, true, true) + '\n');
        
         String nt = (nestedTypes.size() == 0)
             ? ""
             : ('[' + BBLUE + StringParse.zeroPad(nestedTypes.size()) + RESET +
                 "] Nested-Types");
            
         return
             "Name      [" + BYELLOW + name                  + RESET + "]\n" + 
             "Package   [" + BYELLOW + packageName           + RESET + "]\n" +
             "CIET      [" + BYELLOW + ciet                  + RESET + "]\n" +
             "Qualified [" + BYELLOW + fullyQualifiedName    + RESET + "]\n" +
             "Simple    [" + BYELLOW + simpleName            + RESET + "]\n" +
             typeParams +
             m + f + c + ec + ae + nt + '\n';