~oontvoo/+junk/test_hw

« back to all changes in this revision

Viewing changes to src/jminusminus/Type.java

  • Committer: vnguyen
  • Date: 2013-05-09 20:11:19 UTC
  • Revision ID: oontvoo@hotmail.com-20130509201119-0kha5n03ca929puk
- add DoUntil, DoUnless
- implement Logical OR

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    /** java.lang.Boolean. */
61
61
    public final static Type BOXED_BOOLEAN = typeFor(java.lang.Boolean.class);
62
62
 
 
63
    public final static Type BOXED_DOUBLE = typeFor(java.lang.Double.class);
 
64
    
63
65
    /** The primitive byte */
64
66
    public static final Type BYTE = typeFor(byte.class);
65
67
    
463
465
     */
464
466
 
465
467
    private static String descriptorFor(Class<?> cls) {
 
468
        //System.out.println("is double: " + )
466
469
        return cls == null ? "V" : cls == void.class ? "V"
467
470
                : cls.isArray() ? "[" + descriptorFor(cls.getComponentType())
468
 
                        : cls.isPrimitive() ? (cls == int.class ? "I"
 
471
                        : cls.isPrimitive()
 
472
                            ? (cls == int.class ? "I"
469
473
                                : cls == char.class ? "C"
470
 
                                        : cls == boolean.class ? "Z" : "?")
471
 
                                : "L" + cls.getName().replace('.', '/') + ";";
 
474
                                        : cls == boolean.class ? "Z"
 
475
                                                : cls == double.class ? "D" : "?")
 
476
                            : "L" + cls.getName().replace('.', '/') + ";";
472
477
    }
473
478
 
474
479
    /**