code: public static final String getToPrimitiveMethod(final SgClass clasz) {
          final String name = clasz.getName();
          if (name.equals(Boolean.class.getName())) {
              return "booleanValue";
          }
          if (name.equals(Byte.class.getName())) {
              return "byteValue";
          }
          if (name.equals(Character.class.getName())) {
              return "charValue";
          }
          if (name.equals(Short.class.getName())) {
              return "shortValue";
          }
          if (name.equals(Integer.class.getName())) {
              return "intValue";
          }
          if (name.equals(Long.class.getName())) {
              return "longValue";
          }
          if (name.equals(Float.class.getName())) {
              return "floatValue";
          }
          if (name.equals(Double.class.getName())) {
              return "doubleValue";
          }
          throw new IllegalArgumentException("Cannot convert '" + clasz.getName()
                  + "' to a primitive type!");
      }
docs: Returns the name of the conversion method to return a primitive type
  value from the following types: {@link java.lang.Boolean},
  {@link java.lang.Byte}, {@link java.lang.Character},
  {@link java.lang.Short}, {@link java.lang.Integer},
  {@link java.lang.Long}, {@link java.lang.Float} or
  {@link java.lang.Double}. If this class is not one of the above types a
  {@link IllegalArgumentException} will be thrown.
  
  @param clasz
  Class to return a conversion method from.
  
  @return Name of the no argument conversion method (like "intValue" for
  converting an {@link java.lang.Integer} into an <code>int</code>
  ).