public static ClassNode getWrapper ( ClassNode cn ) { cn = cn . redirect ( ) ; if ( ! isPrimitiveType ( cn ) ) return cn ; if ( cn == boolean_TYPE ) { return Boolean_TYPE ; } else if ( cn == byte_TYPE ) { return Byte_TYPE ; } else if ( cn == char_TYPE ) { return Character_TYPE ; } else if ( cn == short_TYPE ) { return Short_TYPE ; } else if ( cn == int_TYPE ) { return Integer_TYPE ; } else if ( cn == long_TYPE ) { return Long_TYPE ; } else if ( cn == float_TYPE ) { return Float_TYPE ; } else if ( cn == double_TYPE ) { return Double_TYPE ; } else if ( cn == VOID_TYPE ) { return void_WRAPPER_TYPE ; } else { return cn ; } }
Creates a ClassNode containing the wrapper of a ClassNode of primitive type . Any ClassNode representing a primitive type should be created using the predefined types used in class . The method will check the parameter for known references of ClassNode representing a primitive type . If Reference is found then a ClassNode will be contained that represents the wrapper class . For example for boolean the wrapper class is java . lang . Boolean .