public boolean isPrimitive(Class type) throws Exception {
  if (type == String.class) {
    return true;
  }
  if (type == Float.class) {
    return true;
  }
  if (type == Double.class) {
    return true;
  }
  if (type == Long.class) {
    return true;
  }
  if (type == Integer.class) {
    return true;
  }
  if (type == Boolean.class) {
    return true;
  }
  if (type.isEnum()) {
    return true;
  }
  if (type.isPrimitive()) {
    return true;
  }
  return transform.valid(type);
}

public boolean isPrimitive ( Class type ) throws Exception { if ( type == String . class ) { return true ; } if ( type == Float . class ) { return true ; } if ( type == Double . class ) { return true ; } if ( type == Long . class ) { return true ; } if ( type == Integer . class ) { return true ; } if ( type == Boolean . class ) { return true ; } if ( type . isEnum ( ) ) { return true ; } if ( type . isPrimitive ( ) ) { return true ; } return transform . valid ( type ) ; }
this is used to determine whether the scanned class represents a primitive type . a primitive type is a type that contains no xml annotations and so cannot be serialized with an xml form . instead primitives a serialized using transformations .
