Class Callable

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    Constructor, Method

    public abstract class Callable
    extends Declaration
    implements java.io.Serializable
    Abstract Superclass:
    This class is the super-class for the classes Constructor and Method
    Java Parser Bridge: Common-Root Ancestor Class of both Method and Constructor.

    This class is abstract and is simply used to represent either a method, or a constructor - both of which can be 'called' by a line of java code. All Callable's have a few things in common, a parameter list, and exception throw list, and a name. Rather than re-write the code that can deal with / handle a list of parameters (their names and types), this abstract class has a few methods for handling these features, and then both class Constructor, and class Method may 're-use' the parameter-list handling code in their own definitions.

    There is a Java-Parser Library that is required to use this Package. The Java Doc Upgrader Package / Tool will not work without this '.jar'file being placed in your CLASSPATH environment-variable. That '.jar'is available here:

    http://developer.torello.directory/ralphsReference/jars/javaparser-core-3.16.2.jar

    There is a book available and an internet "Gitter" support web-site chat-room with some of the people involved in writing this library. There are quite a number of available jars in the "Master Jar Distribution" - but the core library jar is fully sufficient for running the tasks needed by this Java-Doc Upgrade Tool's logic.



    Reflection-Classes Inheritance-Diagram

    Class Declaration
     
    intid
    Entityentity
    Locationlocation
     
    Stringname
    Stringsignature
    StringjdComment
    Stringbody
     
    String[]modifiers
    String[]annotations
     
     
     
     
     
     
    Class Callable
     
    String[]parameterNames
    String[]parameterTypes
    String[]parameterTypesJOW
    String[][]parameterAnnotations
     
    String[]exceptions
     
     
     
     
     
     
    Class Method
     
    StringreturnType
    StringreturnTypeJOW
     
     
     
     
     
    Class Constructor
    Also Inherits Class Callable
    No Additional Fields
    Reflection Class
    Inheritance Diagram


    Class Field
     
    Stringdefinition
    Stringtype
    StringtypeJOW
     
     
     
     
     
    Class EnumConstant
     
    String[]paramExpressions
     
     
     
     
     
    Class AnnotationElem
     
    StringdefaultValue
    Stringtype
    StringtypeJOW
     
     
     
     
     
    Class NestedType
     
    CIETciet
    intnumFields
    intnumMethods
     
    StringfullyQualifiedName
    StringnameWithContainer
    StringpackageName
     
    String[]extendedTypesJOW
    String[]implementedTypesJOW
    String[]genericTypeParameters
     
     
     
     
     




    IMPORTANT:
    All reflection classes above, also contain an additional (transient, non-Serializable) field that hooks into the native Java-Parser Library classes, providing an option for a more in-depth or complete analysis using that Library's features & extensive utilities.
    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;
        
      • parameterNames

        🡅  🡇    
        protected final java.lang.String[] parameterNames
        The names of all parameters to this Method or Constructor.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.

        IMPORTANT: This array must be considered an array that is parallel to the other two arrays, parameterTypes and parameterTypesJOW

        If this Callable instance represents a Method or Constructor that does not accept any parameters, then this field is assigned null.
        See Also:
        getParameterNames(), getParameterNames(Consumer), hasParameterNamed(String), getParameterName(int)
        Code:
        Exact Field Declaration Expression:
         protected final String[] parameterNames;
        
      • parameterTypes

        🡅  🡇    
        protected final java.lang.String[] parameterTypes
        This contains the types of the parameters, stored as String's. The contents of these String's do include: package-name, containing classes (if inner-classes), and generic-parameter expressions (if generic-types). These names are as fully-qualified as the Java Parser Library allows.

        NOTE: The protected String[] array parameterTypesJOW reduces these types (as String's) to a single-word. If a Method or a Constructor accepted a paremeter such as java.util.Iterable<Integer>, and this seemed 'difficult to work with' - the entry in parameterTypesJOW at the same array-location would contain, simply, Iterable.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.

        IMPORTANT: This array must be considered an array that is parallel to the other two arrays, parameterNames and parameterTypesJOW.

        If this Callable instance represents a Method or Constructor that does not accept any parameters, then this field is assigned null.
        See Also:
        parameterTypesJOW, getParameterTypes(), getParameterTypes(Consumer), hasParameterTyped(String), getParameterType(int)
        Code:
        Exact Field Declaration Expression:
         protected final String[] parameterTypes;
        
      • parameterTypesJOW

        🡅  🡇    
        protected final java.lang.String[] parameterTypesJOW
        JOW: Just One Word

        If the String's in a type-as-String contain complicated or intricate detailed information, and all you need is a simple identifier, the JOW-String stores the type-as-String with all package-name and generic-parameters (if they were present / included) stripped from the String. Furthermore, if the type was originally an inner-class, even the containing class-name is removed from the JOW-String.

        If a parameter to a Method, or the type of a Field had the (fully-qualified) type-name: java.util.stream.Stream.Builder<String>, the JOW-String would simply have the word "Builder".

        NOTE: If the type, itself, is an array of any kind, the array-brackets will be included in this String-name.
        Output Single-Word, Type-StringInput Type
        "Entry" "java.util.Map.Entry<K, V>"
        "Vector" "java.util.Vector<E>"
        "Vector" "Vector<TagNode>"
        "Vector" "Vector<Vector<TagNode>>"
        "Vector" "java.util.Vector<Vector<TagNode>>"
        "String" "String"
        "String" "java.lang.String"
        "String[]" "java.lang.String[]"
        "Integer" "Integer"
        "Integer[]" "java.lang.Integer[]"

        NOTE: You may view the StringParse class' methods removeGeneric, and typeToJavaIdentifier for more information.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.

        IMPORTANT: This array must be considered an array that is parallel to the other two arrays, parameterNames and parameterTypes

        If this Callable instance represents a Method or Constructor that does not accept any parameters, then this field is assigned null.
        See Also:
        parameterTypes, getParameterTypesJOW(), getParameterTypesJOW(Consumer), hasParameterTypedJOW(String), getParameterTypeJOW(int)
        Code:
        Exact Field Declaration Expression:
         protected final String[] parameterTypesJOW;
        
      • parameterAnnotations

        🡅  🡇    
        protected final java.lang.String[][] parameterAnnotations
        Any parameters that are annotated will have the exact text-String of the annotations that were used in the source-code for that parameter stored in this two-dimensional String[][] array.

        Java Parser offers a variant of the standard toString() that is known as the LexicalPreservingPrinter. This printer can retrieve the actual character data that may be found in the source-code file for an element in a Java Parser 'AST' (Abstract Syntax Tree). The list of annotations on a parameter (if any) will each be saved as a java.lang.String.

        NOTE: In almost all cases (particularly in the Java HTML Library), this two-dimensional array, itself, will simply be null - since parameter annotations are somewhat uncommon - although, perhaps, some users make use of them from time to time.

        ALSO: This array must be considered as a parallel array to the other arrays, 'parameterNames' and 'parameterTypes'.
        Item Possibility of being null
        parameterAnnotations null if this Method or Constructor has zero arguments
        parameterAnnotations[i] Always null, unless the ith parameter of this Callable was annotated with something
        parameterAnnotations[i][j] Will never be null, (again, as long as parameterAnnotations[i] is not null.
        Note that there may be more than one annotation on a given parameter, which is the whole reason for having a second array-dimension.
        See Also:
        getParameterAnnotations(), getParameterAnnotations(int)
        Code:
        Exact Field Declaration Expression:
         protected final String[][] parameterAnnotations;
        
      • exceptions

        🡅  🡇    
        protected final java.lang.String[] exceptions
        The names of all Exception, Error and Throwable that may be thrown by this Constructor or Method.

        NOTE: Only exceptions which are included in the actual Declaration.signature, inside the original '.java' source-file for this Callable will be listed in this array.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.

        If this Callable instance represents a Method or Constructor that does have any declared throw-statements, then this field is assigned null.
        See Also:
        getExceptions(), getExceptions(Consumer), hasException(String)
        Code:
        Exact Field Declaration Expression:
         protected final String[] exceptions;
        
    • Method Detail

      • getParameterNames

        🡅  🡇    
        public java.lang.String[] getParameterNames()
        Retrieves the list of parameterNames as a String[] array clone

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Returns:
        An instance of String[] that employs the clone() method of the internal data-structure, protecting its contents. If this Callable instance represents a Method or Constructor that does not accept any parameters, then null is returned.
        See Also:
        parameterNames
        Code:
        Exact Method Body:
         return (parameterNames != null) ? parameterNames.clone() : null;
        
      • getParameterNames

        🡅  🡇    
        public void getParameterNames​
                    (java.util.function.Consumer<java.lang.String> acceptParamNameAsStringConsumer)
        
        Provides the list of parameterNames to a user-provided java.util.function.Consumer<String>

        If this Method or Constructor does not accept any parameters, this method shall exit immediately, and gracefully.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Parameters:
        acceptParamNameAsStringConsumer - This should be any java.util.function.Consumer that will accept a reference from the parameterNames array, and perform whatever operations needed.
        See Also:
        parameterNames
        Code:
        Exact Method Body:
         if (parameterNames != null)
             for (String parameterName : parameterNames)
                 acceptParamNameAsStringConsumer.accept(parameterName);
        
      • hasParameterNamed

        🡅  🡇    
        public boolean hasParameterNamed​(java.lang.String name)
        Check whether a particular 'name' has the same name as one of the parameters in the signature of this Callable.
        Parameters:
        name - Any parameter name
        Returns:
        This method will return TRUE if any of the parameters defined in this instance of Callable match the provided 'name'. If this Callable instance represents a Method or Constructor that does not accept any parameters, then this method shall return FALSE, gracefully.
        See Also:
        parameterNames
        Code:
        Exact Method Body:
         if (parameterNames != null)
             for (String parameterName : parameterNames)
                 if (name.equals(parameterName))
                     return true;
        
         return false;
        
      • getParameterName

        🡅  🡇    
        public java.lang.String getParameterName​(int i)
        Returns the name of the ith parameter.
        Parameters:
        i - identifies which parameter is being requested.

        NOTE: Unlike with Java array's, the first parameter is numbered '1' (rather than zero), the second - '2', and so on and so forth.
        Returns:
        The name of the ith parameter, as a String.
        Throws:
        java.lang.IndexOutOfBoundsException - If the value passed to 'i' is negative, zero, or greater than the number of parameters used by this Method or Constructor.
        See Also:
        parameterNames
        Code:
        Exact Method Body:
         if (parameterNames == null) throw new IndexOutOfBoundsException(
             "There are no parameters accepted by the signature of the declaration for this "
             + this.getClass().getSimpleName() + ", " + i + " > 0"
         );
        
         return parameterNames[i-1];
        
      • getParameterTypes

        🡅  🡇    
        public java.lang.String[] getParameterTypes()
        Retrieves the list of parameterTypes as a String[] array.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Returns:
        An instance of String[] that employs the clone() method of the internal data-structure, protecting its contents. If this Callable instance represents a Method or Constructor that does not accept any parameters, then null is returned.
        See Also:
        parameterTypes
        Code:
        Exact Method Body:
         return (parameterTypes != null) ? parameterTypes.clone() : null;
        
      • getParameterTypes

        🡅  🡇    
        public void getParameterTypes​
                    (java.util.function.Consumer<java.lang.String> acceptParamTypeAsStringConsumer)
        
        Provides the list of parameterTypes to a user-provided java.util.function.Consumer<String>

        If this Method or Constructor does not accept any parameters, this method shall exit immediately, and gracefully.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Parameters:
        acceptParamTypeAsStringConsumer - This should be any java.util.function.Consumer that will accept a reference from the parameterTypes array, and perform whatever operations needed.
        See Also:
        parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypes != null)
             for (String parameterType : parameterTypes)
                 acceptParamTypeAsStringConsumer.accept(parameterType);
        
      • hasParameterTyped

        🡅  🡇    
        public boolean hasParameterTyped​(java.lang.String type)
        Check whether a particular 'type' (as a String) has the same String-value as one of the parameters in the signature of this Callable.
        Parameters:
        type - Any fully-qualified parameter type as a java.lang.String
        Returns:
        This method will return TRUE if any of the parameters defined in this instance of Callable have a type that matches the provided 'type'. If this Callable instance represents a Method or Constructor that does not accept any parameters, FALSE is returned, gracefully.
        See Also:
        parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypes != null)
             for (String parameterType : parameterTypes)
                 if (type.equals(parameterType))
                     return true;
        
         return false;
        
      • getParameterType

        🡅  🡇    
        public java.lang.String getParameterType​(int i)
        Returns the type of the ith parameter.
        Parameters:
        i - identifies which parameter whose type is being requested.

        NOTE: Unlike with Java array's, the first parameter is numbered '1' (rather than zero), the second - '2', and so on and so forth.
        Returns:
        The fully-qualified type of the ith parameter, as a String.
        Throws:
        java.lang.IndexOutOfBoundsException - If the value passed to 'i' is negative, zero, or greater than the number of parameters used by this Method or Constructor.
        See Also:
        parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypes == null) throw new IndexOutOfBoundsException(
             "There are no parameters accepted by the signature of the declaration for this "
             + this.getClass().getSimpleName() + ", " + i + " > 0"
         );
            
         return parameterTypes[i-1];
        
      • getParameterType

        🡅  🡇    
        public java.lang.String getParameterType​(java.lang.String parameterName)
        This will retrieve the type of the parameter (as a String) that has the name 'parameterName'. This method will simply return null, gracefully, if this Method or Constructor does not have a parameter with that name. This method will not throw an exception in such cases.
        Parameters:
        parameterName - The name of the parameter whose type you are requesting.
        Returns:
        The fully-qualified type of the parameter, as a String having the name 'parameterName', or null if no such type exists.
        See Also:
        parameterTypes, parameterNames
        Code:
        Exact Method Body:
         for (int i=0; i < parameterNames.length; i++)
             if (parameterNames[i].equals(parameterName))
                 return parameterTypes[i];
        
         return null;
        
      • getParameterTypesJOW

        🡅  🡇    
        public java.lang.String[] getParameterTypesJOW()
        Retrieves the list of parameterTypesJOW as a String[] array. Each type in this String-array will be just a single-word - the name of the class, interface, enum, or record.

        JOW: Just One Word - The types in the String[] array field parameterTypesJOW are simplified to just a single 'Java Identifier' part. All outer-class, package, and generic type-parameter information are stripped from these array entries. Please see the detailed-description of parameterTypesJOW for a better explanation.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Returns:
        An instance of String[] that employs the clone() method of the internal data-structure, protecting its contents. If this Callable instance represents a Method or Constructor that does not accept any parameters, then null is returned.
        See Also:
        parameterTypesJOW, parameterTypes
        Code:
        Exact Method Body:
         return (parameterTypesJOW != null) ? parameterTypesJOW.clone() : null;
        
      • getParameterTypesJOW

        🡅  🡇    
        public void getParameterTypesJOW​
                    (java.util.function.Consumer<java.lang.String> acceptParamTypeAsStringConsumer)
        
        Provides the list of parameterTypesJOW to a user-provided java.util.function.Consumer<String>

        If this Method or Constructor does not accept any parameters, this method shall exit immediately, and gracefully.

        JOW: Just One Word - The types in the String[] array field parameterTypesJOW are simplified to just a single 'Java Identifier' part. All outer-class, package, and generic type-parameter information are stripped from these array entries. Please see the detailed-description of parameterTypesJOW for a better explanation.

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Parameters:
        acceptParamTypeAsStringConsumer - This should be any java.util.function.Consumer that will accept a reference from the parameterTypesJOW array, and perform whatever operations needed.
        See Also:
        parameterTypesJOW, parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypesJOW != null)
             for (String parameterTypeJOW : parameterTypesJOW)
                 acceptParamTypeAsStringConsumer.accept(parameterTypeJOW);
        
      • hasParameterTypedJOW

        🡅  🡇    
        public boolean hasParameterTypedJOW​(java.lang.String type)
        Check whether a particular 'type' (as a String) has the same String-value as one of the parameters in the signature of this Callable.

        JOW: Just One Word - The types in the String[] array field parameterTypesJOW are simplified to just a single 'Java Identifier' part. All outer-class, package, and generic type-parameter information are stripped from these array entries. Please see the detailed-description of parameterTypesJOW for a better explanation.
        Parameters:
        type - Any, just-one-word, parameter type as a java.lang.String.
        Returns:
        This method will return TRUE if any of the parameters defined in this instance of Callable have a type whose-name matches the provided 'type'.

        If this Callable represents a Method or Constructor that does not accept any parameters, this method shall return FALSE, gracefully.
        See Also:
        parameterTypesJOW, parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypesJOW != null)
             for (String parameterTypeJOW : parameterTypesJOW)
                 if (type.equals(parameterTypeJOW)) return true;
        
         return false;
        
      • getParameterTypeJOW

        🡅  🡇    
        public java.lang.String getParameterTypeJOW​(int i)
        Returns the type of the ith parameter.

        JOW: Just One Word - The types in the String[] array field parameterTypesJOW are simplified to just a single 'Java Identifier' part. All outer-class, package, and generic type-parameter information are stripped from these array entries. Please see the detailed-description of parameterTypesJOW for a better explanation.
        Parameters:
        i - identifies which parameter whose type is being requested.

        NOTE: Unlike with Java array's, the first parameter is numbered '1' (rather than zero), the second - '2', and so on and so forth.
        Returns:
        The one-word type-name of the ith parameter, as a String.
        Throws:
        java.lang.IndexOutOfBoundsException - If the value passed to 'i' is negative, zero, or greater than the number of parameters used by this Method or Constructor.
        See Also:
        parameterTypesJOW, parameterTypes
        Code:
        Exact Method Body:
         if (parameterTypesJOW == null) throw new IndexOutOfBoundsException(
             "There are no parameters accepted by the signature of the declaration for this "
             + this.getClass().getSimpleName() + ", " + i + " > 0"
         );
            
         return parameterTypesJOW[i-1]; // May also throw IOOBEX
        
      • getParameterTypeJOW

        🡅  🡇    
        public java.lang.String getParameterTypeJOW​
                    (java.lang.String parameterName)
        
        This will retrieve the type of the parameter (as a String) that has the name 'parameterName'. This method will simply return null, gracefully, if this Method or Constructor does not have a parameter with that name. This method will not throw an exception in such cases.

        JOW: Just One Word - The types in the String[] array field parameterTypesJOW are simplified to just a single 'Java Identifier' part. All outer-class, package, and generic type-parameter information are stripped from these array entries. Please see the detailed-description of parameterTypesJOW for a better explanation.
        Parameters:
        parameterName - The name of the parameter whose type you are requesting.
        Returns:
        The type of the parameter, as a one-word String having the name 'parameterName'.
        See Also:
        parameterTypesJOW, parameterTypes, parameterNames
        Code:
        Exact Method Body:
         if (parameterNames != null)
             for (int i=0; i < parameterNames.length; i++)
                 if (parameterNames[i].equals(parameterName))
                     return parameterTypesJOW[i];
        
         return null;
        
      • getParameterAnnotations

        🡅  🡇    
        public java.lang.String[][] getParameterAnnotations()
        Returns a clone of the internal two-dimensional parameterAnnotations array.

        The length of this array will be precisely equal to the number of parameters that were ascribed to this Callable - which is how many parameters are used when calling this Method or Constructor. This means that the "first order" of this two-dimensional String array will never be null.

        The "second order" of this two-dimensional String array, however, can contain nulls. For every parameter that was not annotated with anything, it's respective place in the array will be null! (Note that this means in likely 99.99% of situations, calling this method with simply return a String array that if filled with nulls, since annotated parameters are not very common)

        NOTE: The value returned by this method may also be null. If this method (getParameterAnnotations) is invoked on a Callable instanc whose signature doesn't have any parameters in the first place, then the "first order" of this two-dimensional array will be null (this method returns null in this case).

        NOTE: Access to the internal-arrays is restricted as 'protected' to prevent any accidental or intentional changing of the values. This is to ensure that the contents of this class are always consistent with the source-code '.java' file on disk.
        Returns:
        A clone of the parameterAnnotations array. If this Callable instance represents a Method or Constructor that does not accept any parameters, then null is returned.
        See Also:
        parameterAnnotations
        Code:
        Exact Method Body:
         if (parameterAnnotations == null) return null;
        
         String[][] ret = new String[parameterAnnotations.length][];
        
         for (int i=0; i < ret.length; i++)
             ret[i] = (parameterAnnotations[i] == null)
                 ? null
                 : parameterAnnotations[i].clone();
        
         return ret;
        
      • getParameterAnnotations

        🡅  🡇    
        public java.lang.String[] getParameterAnnotations​(int i)
        Returns the list of annotations (if any) that were ascribed to the ith parameter of this Method or Constructor.
        Parameters:
        i - identifies which parameter whose annotations list is being requested.

        NOTE: Unlike Java array's, the first parameter is numbered '1' (rather than zero), the second - '2', and so on and so forth.
        Returns:
        The list of annotations that were placed on the ith parameter, as a String[] array.

        IMPORTANT: This method will return null if there weren't any annotations placed on the parameter in the source-code, rather than a zero-length String[] array.

        SANITY CHECK: Since most parameters to a method or constructor aren't annotated with anything, invoking this method will usually get you a null return value.
        Throws:
        java.lang.IndexOutOfBoundsException - If the value passed to 'i' is negative, zero, or greater than the number of parameters used by this Method or Constructor.
        See Also:
        parameterAnnotations
        Code:
        Exact Method Body:
         if (parameterAnnotations == null) throw new IndexOutOfBoundsException(
             "There are no parameters accepted by the signature of the declaration for this "
             + this.getClass().getSimpleName() + ", " + i + " > 0"
         );
            
         return parameterAnnotations[i-1]; // Also may throw IOOBEX
        
      • getParameterAnnotations

        🡅  🡇    
        public void getParameterAnnotations​
                    (java.util.function.Consumer<java.lang.String[]> acceptParamAnnotationAsStringConsumer)
        
        Provides the list of parameterAnnotations to a user-provided java.util.function.Consumer<String[]>

        NOTE: Since any number of annotations may adorn each and every parameter in the signature of this Callable, this Consumer must accept a String[]-Array, rather than a String.

        If this Method or Constructor does not accept any parameters, this method shall exit immediately, and gracefully.
        Parameters:
        acceptParamAnnotationAsStringConsumer - This should be any java.util.function.Consumer that will accept a reference from the parameterAnnotations array, and perform whatever operations needed.
        See Also:
        parameterAnnotations
        Code:
        Exact Method Body:
         if (parameterAnnotations != null)
             for (String[] parameterAnnotation : parameterAnnotations)
                 acceptParamAnnotationAsStringConsumer.accept(parameterAnnotation);
        
      • getParameterAnnotations

        🡅  🡇    
        public java.lang.String[] getParameterAnnotations​
                    (java.lang.String parameterName)
        
        This will retrieve the annotations-list that may (or may not) adorn the parameter which uses the name 'parameterName'.

        This method will simply return null, gracefully, if this Method or Constructor does not have a parameter with that name. This method will not throw an exception in such cases.

        NOTE:This method will also return null even if a parameter having the provided name is found, but that parameter wasn't annotated with anything. If a null is returned, distinguishing between the case where 'parameterName' just wasn't found, and the case where that parameter wasn't annotated - isn't possible here.
        Parameters:
        parameterName - The name of the parameter whose annotation-list you are requesting.
        Returns:
        The type of the parameter having the name 'parameterName'.
        See Also:
        parameterAnnotations, parameterNames
        Code:
        Exact Method Body:
         if (parameterNames == null) return null;
        
         for (int i=0; i < parameterNames.length; i++)
             if (parameterNames[i].equals(parameterName))
                 return parameterAnnotations[i];
                     // In the line above, if a parameter isnt annotated, that location in the 
                     // array will have a 'null'
        
         return null;
        
      • getExceptions

        🡅  🡇    
        public java.lang.String[] getExceptions()
        Retrieves the list of Exception's as a String[] array. The String's that are returned from this method are the ones stored internally to the exceptions String-Array.
        Returns:
        An instance of String[] that employs the clone() method of the internal data-structure, protecting its contents. If this Callable instance represents a Method or Constructor which has not declared any exception's in the 'throws'-part of its Declaration.signature then this method will return null.
        See Also:
        exceptions
        Code:
        Exact Method Body:
         return (exceptions != null) ? exceptions.clone() : null;
        
      • getExceptions

        🡅  🡇    
        public void getExceptions​
                    (java.util.function.Consumer<java.lang.String> acceptExceptionsAsStringConsumer)
        
        Provides the list of exceptions to a user-provided java.util.function.Consumer<String>

        If this Method or Constructor does not declar any thrown exceptions in its signature, this method exits gracefullly.
        Parameters:
        acceptExceptionsAsStringConsumer - This should be any java.util.function.Consumer that will accept a reference from the exceptions array, and perform whatever operations needed.
        See Also:
        exceptions
        Code:
        Exact Method Body:
         if (exceptions != null)
             for (String exception : exceptions)
                 acceptExceptionsAsStringConsumer.accept(exception);
        
      • hasException

        🡅  🡇    
        public boolean hasException​(java.lang.String exception)
        Check whether a particular 'exception' (or other 'Throwable') is thrown, according to the declared-signature of this Callable.
        Parameters:
        exception - Any Exception, Error or Throwable name, as a java.lang.String
        Returns:
        This method will return TRUE if any of the Throwables listed in this instance of Callable match the provided 'exception'.

        NOTE: The exceptions listed in this class are only the ones that are included in the Method or Constructor Signature. This should be similar to (but not identical to) the list of Checked-Exceptions. No in-depth code-analysis is performed, as it is a nearly impossible problem to solve. Instead, when a parse is performed, the exceptions listed in the 'throws' clause of the Method or Constructor being parsed placed into this class 'exceptions' array.

        FINALLY: The exception-name as String should be the simple name of the exception, which excludes the exception class' package location. (This array might have IOException, but not java.io.IOException).

        Exception's may not have generic type-parameters (the Java Compiler produces a compile time error if an attempt is made to build a class that inherits 'Throwable', and tries to specify generic type-parameters).

        On the off chance that the exception is an inner-class (I've never done that, but it is allowed), the containing outer-classes should be present in the exception-name array.
        See Also:
        exceptions
        Code:
        Exact Method Body:
         if (exceptions == null) return false;
         for (String e : exceptions) if (e.equals(exception)) return true;
         return false;
        
      • hasParameters

        🡅  🡇    
        public boolean hasParameters()
        Returns whether there were parameters parsed from the source-code file for 'this' instance of 'Callable'.
        Returns:
        Whether the protected, internal 'parameterNames' array is non-null, and has a length greater than zero.
        See Also:
        parameterNames
        Code:
        Exact Method Body:
         return (parameterNames != null) && (parameterNames.length > 0);
        
      • numExceptions

        🡅  🡇    
        public int numExceptions()
        Returns the array-length of the internal exceptions array, or simply 0 if that array is null.
        Returns:
        The number of declared excepion throws in the signature of this Callable
        See Also:
        exceptions
        Code:
        Exact Method Body:
         return (exceptions == null) ? 0 : exceptions.length;
        
      • hasExceptions

        🡅  🡇    
        public boolean hasExceptions()
        Returns whether there were exceptions parsed from the source-code file for 'this' instance of 'Callable'.

        NOTE: Only exceptions which are declared in the Declaration.signature of this Callable, inside the original source-code '.java' file from which this Callable was parsed will be listed in the n this class' internal-protected exceptions array.
        Returns:
        Whether the protected, internal 'exceptions' array is non-null, and has a length greater than zero
        See Also:
        exceptions
        Code:
        Exact Method Body:
         return (exceptions != null) && (exceptions.length > 0);
        
      • hasAnnotatedParameters

        🡅  🡇    
        public boolean hasAnnotatedParameters()
        This will look at each parmeter's annotation array to see if there are any parameters in this Callable's invocation parameter-list that were annotated with anything.
        Returns:
        TRUE if there are any parameters that were annotated with something, and false if every parameter in the parameter-list had a 'null' String array of parameter-annotations.

        If this instance of Callable is one which does not accept any parameters, this methhod will return FALSE immediately.

        NOTE: The internal 'parameterAnnotations' field for class Callable is implemented as a two-dimensional String-array. There may be any number of parameters that are passed to a Method or Constructor, and each of those parameters may have any number of annotations that were attached to them.

        SANITY-CHECK Likely 99.99% of the parameters in the Java HTML library do not have any parameter's that are annotated.
        See Also:
        parameterAnnotations
        Code:
        Exact Method Body:
         if (parameterAnnotations == null) return false;
        
         for (String[] paList : parameterAnnotations)
             if (paList != null) return true;
        
         return false;
        
      • numAnnotatedParameters

        🡅  🡇    
        public int numAnnotatedParameters()
        Reports how many of the parameters in the internal list of parameters that had annotations attached to them.

        SANITY-CHECK Likely 99.99% of the parameters in the Java HTML library do not have any parameter's that are annotated.
        Returns:
        This will count how many parameters which are used by this Callable (either Method or Field) that have annotations that were attached to the parameter.
        See Also:
        parameterAnnotations
        Code:
        Exact Method Body:
         int count = 0;
        
         if (parameterAnnotations == null) return 0;
        
         // NOTE: each parameter has an "Annotation List" stored in a 2-D array.  This is why
         //       this for-loop is using 'String[]', rather than 'String' ...
         //       A parameter may be annotated with zero annotations, one, or many annotations.
         for (String[] paList : parameterAnnotations) if (paList != null) count++;
        
         return count;