Class FieldUtilities


  • public class FieldUtilities
    extends Object
    • Method Detail

      • isPrimitive

        public boolean isPrimitive​(Field field)
      • isPrimitive

        public boolean isPrimitive​(String className)
      • isPrimitive

        public boolean isPrimitive​(Class<?> clazz)
      • isPrimitiveArray

        public boolean isPrimitiveArray​(Field field)
        Checks if the specified field's value represents a primitive array of rank 1. So this would return true if the field represents a double[], but not a double[][] or a Object[].
        Parameters:
        field - the field to check
        Returns:
        if the specified field represents a primitive array
      • isPrimitiveArray

        public boolean isPrimitiveArray​(String className)
        Checks if the specified string representation of a class represents a primitive array of rank 1. So this would return true if the string represents a double[], but not a double[][] or a Object[].
        Parameters:
        className - the name of the class to check
        Returns:
        if the specified class name represents a primitive array
      • isPrimitiveArray

        public boolean isPrimitiveArray​(Class<?> clazz)
        Checks if the specified class represents a primitive array of rank 1. So this would return true if the class represents a double[], but not a double[][] or a Object[].
        Parameters:
        clazz - the class to check
        Returns:
        if the specified class represents a primitive array
      • getTypeAsString

        public String getTypeAsString​(Object o)