64
65 private JClass arrayClass;
66 public JClass array() {
67 if(arrayClass==null)
68 arrayClass = new JArrayClass(owner,this);
69 return arrayClass;
70 }
71
72 /**
73 * Obtains the wrapper class for this primitive type.
74 * For example, this method returns a reference to java.lang.Integer
75 * if this object represents int.
76 */
77 public JClass boxify() {
78 return wrapperClass;
79 }
80
81 /**
82 * @deprecated calling this method from {@link JPrimitiveType}
83 * would be meaningless, since it's always guaranteed to
84 * return <tt>this</tt>.
85 */
86 public JType unboxify() {
87 return this;
88 }
89
90 /**
91 * @deprecated
92 * Use {@link #boxify()}.
93 */
94 public JClass getWrapperClass() {
95 return boxify();
96 }
97
98 /**
99 * Wraps an expression of this type to the corresponding wrapper class.
100 * For example, if this class represents "float", this method will return
101 * the expression <code>new Float(x)</code> for the paramter x.
102 *
103 * REVISIT: it's not clear how this method works for VOID.
104 */
|
64
65 private JClass arrayClass;
66 public JClass array() {
67 if(arrayClass==null)
68 arrayClass = new JArrayClass(owner,this);
69 return arrayClass;
70 }
71
72 /**
73 * Obtains the wrapper class for this primitive type.
74 * For example, this method returns a reference to java.lang.Integer
75 * if this object represents int.
76 */
77 public JClass boxify() {
78 return wrapperClass;
79 }
80
81 /**
82 * @deprecated calling this method from {@link JPrimitiveType}
83 * would be meaningless, since it's always guaranteed to
84 * return {@code this}.
85 */
86 public JType unboxify() {
87 return this;
88 }
89
90 /**
91 * @deprecated
92 * Use {@link #boxify()}.
93 */
94 public JClass getWrapperClass() {
95 return boxify();
96 }
97
98 /**
99 * Wraps an expression of this type to the corresponding wrapper class.
100 * For example, if this class represents "float", this method will return
101 * the expression <code>new Float(x)</code> for the paramter x.
102 *
103 * REVISIT: it's not clear how this method works for VOID.
104 */
|