Class Classes

    • Constructor Detail

      • Classes

        public Classes()
    • Method Detail

      • getPrimitiveWrapper

        public static Class getPrimitiveWrapper​(Class type)
        Get the wrapper class for the given primitive type.
        Parameters:
        type - Primitive class.
        Returns:
        Wrapper class for primitive.
        Throws:
        IllegalArgumentException - Type is not a primitive class
      • isPrimitiveWrapper

        public static boolean isPrimitiveWrapper​(Class type)
        Check if the given class is a primitive wrapper class.
        Parameters:
        type - Class to check.
        Returns:
        True if the class is a primitive wrapper.
      • getAttributeGetter

        public static Method getAttributeGetter​(Class cls,
                                                String attr)
                                         throws NoSuchMethodException
        Returns attribute's getter method. If the method not found then NoSuchMethodException will be thrown.
        Parameters:
        cls - the class the attribute belongs too
        attr - the attribute's name
        Returns:
        attribute's getter method
        Throws:
        NoSuchMethodException - if the getter was not found