Class CLIReflectionUtil


  • public class CLIReflectionUtil
    extends Object

    Created by Jeff Gaynor
    on 5/21/13 at 2:28 PM

    • Constructor Detail

      • CLIReflectionUtil

        public CLIReflectionUtil()
    • Method Detail

      • isJavaObjectMethod

        public static boolean isJavaObjectMethod​(String methodName,
                                                 int mods)
        Returns true if the methodName is one of the java.lang.Object basic methods (e.g. toString()).
        Parameters:
        methodName -
        mods -
        Returns:
      • getCommandsNameList

        public static String[] getCommandsNameList​(Commands[] commands)
        This snoops through the CCI and gets those methods that are not in Java.lang.Object, are public and are not static. Note that this will return all the unique names in the commands array. This method is not tasked with dis-ambiguating them.
        Returns:
        java.lang.String[]
      • hasRightSignature

        public static boolean hasRightSignature​(Method method)
        Checks that the method has the correct signature for the contract in the Commands interface, i.e. that takes a single InputLine as it argument, is public and not static.
        Parameters:
        method -
        Returns: