Class ClassUtil


  • @Deprecated
    public final class ClassUtil
    extends Object
    Deprecated.
    Is internal API
    Various class-related utility methods intended for mapping common java.lang types to their short short forms allowing end users to enter these names in UIs without the package prefixes.
    Author:
    Brian Remedios
    • Field Detail

      • EMPTY_CLASS_ARRAY

        public static final Class<?>[] EMPTY_CLASS_ARRAY
        Deprecated.
    • Method Detail

      • getPrimitiveTypeFor

        public static Class<?> getPrimitiveTypeFor​(String name)
        Deprecated.
        Returns the type(class) for the name specified or null if not found.
        Parameters:
        name - String
        Returns:
        Class
      • getClassShortNames

        public static Map<Class<?>,​String> getClassShortNames()
        Deprecated.
      • getTypeFor

        public static Class<?> getTypeFor​(String shortName)
        Deprecated.
        Attempt to determine the actual class given the short name.
        Parameters:
        shortName - String
        Returns:
        Class
      • asShortestName

        public static String asShortestName​(Class<?> type)
        Deprecated.
        Return the name of the type in its short form if its known to us otherwise return its name fully packaged.
        Parameters:
        type -
        Returns:
        String
      • withoutPackageName

        public static String withoutPackageName​(String fullTypeName)
        Deprecated.
        Returns the abbreviated name of the type, without the package name
        Parameters:
        fullTypeName -
        Returns:
        String
      • methodFor

        public static Method methodFor​(Class<?> clasz,
                                       String methodName,
                                       Class<?>[] paramTypes)
        Deprecated.
        Attempts to return the specified method from the class provided but will walk up its superclasses until it finds a match. Returns null if it doesn't.
        Parameters:
        clasz - Class
        methodName - String
        paramTypes - Class[]
        Returns:
        Method
      • asMethodGroupsByTypeName

        public static Map<String,​List<Method>> asMethodGroupsByTypeName​(Method[] methods)
        Deprecated.
        Return the methods as a map keyed by their common declaration types.
        Parameters:
        methods -
        Returns:
        methods grouped by declaring type name
      • asMethodGroupsByTypeName

        public static Map<String,​List<Method>> asMethodGroupsByTypeName​(List<Method> methods)
        Deprecated.
        Return the methods as a map keyed by their common declaration types.
        Parameters:
        methods -
        Returns:
        methods grouped by declaring type name