Class ClassHelper

java.lang.Object
com.j_spaces.kernel.ClassHelper

public final class ClassHelper extends Object
Helper for setting/getting any public properties.
Version:
4.0
Author:
Gershon Diner
  • Method Details

    • getMethod

      public static Method getMethod(Class type, String name, Object[] args) throws NoSuchMethodException
      Helper to return a method given its name and a list of arguments
      Parameters:
      type - the class to locate the method on
      name - the method name
      args - the list of arguments to match against, or null if the method takes no arguments
      Returns:
      the method matching the name and list of arguments
      Throws:
      NoSuchMethodException - if the method cannot be found
    • getPrimitiveType

      public static Class getPrimitiveType(Class wrapper)
      Helper to return the primitive type associated with an object wrapper type
      Parameters:
      wrapper - the object wrapper class
      Returns:
      the associated primitive type, or the wrapper type, if there is no associated primitive type
    • getPrimitiveName

      public static String getPrimitiveName(Class wrapper)
      Helper to return the primitive type name associated with an object wrapper type
      Parameters:
      wrapper - the object wrapper class
      Returns:
      the associated primitive type name, or the wrapper type name, if there is no associated primitive type. Array types are returned in the form '[]'