Class PrimitiveMemberChecker


  • public class PrimitiveMemberChecker
    extends java.lang.Object
    Author:
    Michael Rimov
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isPrimitiveArgument​(java.lang.reflect.AccessibleObject member, int i)
      Checks if the target argument is primative.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrimitiveMemberChecker

        public PrimitiveMemberChecker()
    • Method Detail

      • isPrimitiveArgument

        public static boolean isPrimitiveArgument​(java.lang.reflect.AccessibleObject member,
                                                  int i)
                                           throws java.lang.ArrayIndexOutOfBoundsException,
                                                  java.lang.UnsupportedOperationException
        Checks if the target argument is primative.
        Parameters:
        member - target member instance, may be constructor, field, or method.
        i - parameter index.
        Returns:
        true if the target object's "i"th parameter is a primitive (ie, int, float, etc)
        Throws:
        java.lang.UnsupportedOperationException - if for some reason the member parameter is not a Constructor, Method, or Field.
        java.lang.ArrayIndexOutOfBoundsException - if 'i' is an inappropriate index for the given parameters. For example, i should never be anything but zero for a field.