001: /*
002: * The contents of this file are subject to the terms
003: * of the Common Development and Distribution License
004: * (the "License"). You may not use this file except
005: * in compliance with the License.
006: *
007: * You can obtain a copy of the license at
008: * https://jwsdp.dev.java.net/CDDLv1.0.html
009: * See the License for the specific language governing
010: * permissions and limitations under the License.
011: *
012: * When distributing Covered Code, include this CDDL
013: * HEADER in each file and include the License file at
014: * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
015: * add the following below this CDDL HEADER, with the
016: * fields enclosed by brackets "[]" replaced with your
017: * own identifying information: Portions Copyright [yyyy]
018: * [name of copyright owner]
019: */
020: package com.sun.codemodel;
021:
022: /**
023: * Provides default implementations for {@link JExpression}.
024: */
025: public abstract class JExpressionImpl implements JExpression {
026: //
027: //
028: // from JOp
029: //
030: //
031: public final JExpression minus() {
032: return JOp.minus(this );
033: }
034:
035: /**
036: * Logical not <tt>'!x'</tt>.
037: */
038: public final JExpression not() {
039: return JOp.not(this );
040: }
041:
042: public final JExpression complement() {
043: return JOp.complement(this );
044: }
045:
046: public final JExpression incr() {
047: return JOp.incr(this );
048: }
049:
050: public final JExpression decr() {
051: return JOp.decr(this );
052: }
053:
054: public final JExpression plus(JExpression right) {
055: return JOp.plus(this , right);
056: }
057:
058: public final JExpression minus(JExpression right) {
059: return JOp.minus(this , right);
060: }
061:
062: public final JExpression mul(JExpression right) {
063: return JOp.mul(this , right);
064: }
065:
066: public final JExpression div(JExpression right) {
067: return JOp.div(this , right);
068: }
069:
070: public final JExpression mod(JExpression right) {
071: return JOp.mod(this , right);
072: }
073:
074: public final JExpression shl(JExpression right) {
075: return JOp.shl(this , right);
076: }
077:
078: public final JExpression shr(JExpression right) {
079: return JOp.shr(this , right);
080: }
081:
082: public final JExpression shrz(JExpression right) {
083: return JOp.shrz(this , right);
084: }
085:
086: public final JExpression band(JExpression right) {
087: return JOp.band(this , right);
088: }
089:
090: public final JExpression bor(JExpression right) {
091: return JOp.bor(this , right);
092: }
093:
094: public final JExpression cand(JExpression right) {
095: return JOp.cand(this , right);
096: }
097:
098: public final JExpression cor(JExpression right) {
099: return JOp.cor(this , right);
100: }
101:
102: public final JExpression xor(JExpression right) {
103: return JOp.xor(this , right);
104: }
105:
106: public final JExpression lt(JExpression right) {
107: return JOp.lt(this , right);
108: }
109:
110: public final JExpression lte(JExpression right) {
111: return JOp.lte(this , right);
112: }
113:
114: public final JExpression gt(JExpression right) {
115: return JOp.gt(this , right);
116: }
117:
118: public final JExpression gte(JExpression right) {
119: return JOp.gte(this , right);
120: }
121:
122: public final JExpression eq(JExpression right) {
123: return JOp.eq(this , right);
124: }
125:
126: public final JExpression ne(JExpression right) {
127: return JOp.ne(this , right);
128: }
129:
130: public final JExpression _instanceof (JType right) {
131: return JOp._instanceof (this , right);
132: }
133:
134: //
135: //
136: // from JExpr
137: //
138: //
139: public final JInvocation invoke(JMethod method) {
140: return JExpr.invoke(this , method);
141: }
142:
143: public final JInvocation invoke(String method) {
144: return JExpr.invoke(this , method);
145: }
146:
147: public final JFieldRef ref(JVar field) {
148: return JExpr.ref(this , field);
149: }
150:
151: public final JFieldRef ref(String field) {
152: return JExpr.ref(this , field);
153: }
154:
155: public final JArrayCompRef component(JExpression index) {
156: return JExpr.component(this, index);
157: }
158: }
|