jaxws/src/share/classes/com/sun/codemodel/internal/JExpression.java
author tonyp
Wed, 19 Aug 2009 12:53:25 -0400
changeset 3691 c84b8483cd2c
parent 2678 57cf2a1c1a05
permissions -rw-r--r--
6871111: G1: remove the concurrent overhead tracker Summary: Removing the concurrent overhead tracker from G1, along with the GC overhead reporter and the G1AccountConcurrentOverhead (both of which rely on the the concurrent overhead tracker). Reviewed-by: iveresov, johnc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
474761f14bca Initial load
duke
parents:
diff changeset
     1
/*
2678
57cf2a1c1a05 6831313: update jaxws in OpenJDK7 to 2.1 plus bug fixes from OpenJDK 6
tbell
parents: 8
diff changeset
     2
 * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
8
474761f14bca Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
474761f14bca Initial load
duke
parents:
diff changeset
     4
 *
474761f14bca Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
474761f14bca Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
474761f14bca Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
474761f14bca Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
474761f14bca Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
474761f14bca Initial load
duke
parents:
diff changeset
    10
 *
474761f14bca Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
474761f14bca Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
474761f14bca Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
474761f14bca Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
474761f14bca Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
474761f14bca Initial load
duke
parents:
diff changeset
    16
 *
474761f14bca Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
474761f14bca Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
474761f14bca Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
474761f14bca Initial load
duke
parents:
diff changeset
    20
 *
474761f14bca Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
474761f14bca Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
474761f14bca Initial load
duke
parents:
diff changeset
    23
 * have any questions.
474761f14bca Initial load
duke
parents:
diff changeset
    24
 */
474761f14bca Initial load
duke
parents:
diff changeset
    25
474761f14bca Initial load
duke
parents:
diff changeset
    26
package com.sun.codemodel.internal;
474761f14bca Initial load
duke
parents:
diff changeset
    27
474761f14bca Initial load
duke
parents:
diff changeset
    28
474761f14bca Initial load
duke
parents:
diff changeset
    29
/**
474761f14bca Initial load
duke
parents:
diff changeset
    30
 * A Java expression.
474761f14bca Initial load
duke
parents:
diff changeset
    31
 *
474761f14bca Initial load
duke
parents:
diff changeset
    32
 * <p>
474761f14bca Initial load
duke
parents:
diff changeset
    33
 * Unlike most of CodeModel, JExpressions are built bottom-up (
474761f14bca Initial load
duke
parents:
diff changeset
    34
 * meaning you start from leaves and then gradually build compliated expressions
474761f14bca Initial load
duke
parents:
diff changeset
    35
 * by combining them.)
474761f14bca Initial load
duke
parents:
diff changeset
    36
 *
474761f14bca Initial load
duke
parents:
diff changeset
    37
 * <p>
474761f14bca Initial load
duke
parents:
diff changeset
    38
 * {@link JExpression} defines a series of composer methods,
474761f14bca Initial load
duke
parents:
diff changeset
    39
 * which returns a complicated expression (by often taking other {@link JExpression}s
474761f14bca Initial load
duke
parents:
diff changeset
    40
 * as parameters.
474761f14bca Initial load
duke
parents:
diff changeset
    41
 * For example, you can build "5+2" by
474761f14bca Initial load
duke
parents:
diff changeset
    42
 * <tt>JExpr.lit(5).add(JExpr.lit(2))</tt>
474761f14bca Initial load
duke
parents:
diff changeset
    43
 */
474761f14bca Initial load
duke
parents:
diff changeset
    44
public interface JExpression extends JGenerable {
474761f14bca Initial load
duke
parents:
diff changeset
    45
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    46
     * Returns "-[this]" from "[this]".
474761f14bca Initial load
duke
parents:
diff changeset
    47
     */
474761f14bca Initial load
duke
parents:
diff changeset
    48
    JExpression minus();
474761f14bca Initial load
duke
parents:
diff changeset
    49
474761f14bca Initial load
duke
parents:
diff changeset
    50
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    51
     * Returns "![this]" from "[this]".
474761f14bca Initial load
duke
parents:
diff changeset
    52
     */
474761f14bca Initial load
duke
parents:
diff changeset
    53
    JExpression not();
474761f14bca Initial load
duke
parents:
diff changeset
    54
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    55
     * Returns "~[this]" from "[this]".
474761f14bca Initial load
duke
parents:
diff changeset
    56
     */
474761f14bca Initial load
duke
parents:
diff changeset
    57
    JExpression complement();
474761f14bca Initial load
duke
parents:
diff changeset
    58
474761f14bca Initial load
duke
parents:
diff changeset
    59
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    60
     * Returns "[this]++" from "[this]".
474761f14bca Initial load
duke
parents:
diff changeset
    61
     */
474761f14bca Initial load
duke
parents:
diff changeset
    62
    JExpression incr();
474761f14bca Initial load
duke
parents:
diff changeset
    63
474761f14bca Initial load
duke
parents:
diff changeset
    64
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    65
     * Returns "[this]--" from "[this]".
474761f14bca Initial load
duke
parents:
diff changeset
    66
     */
474761f14bca Initial load
duke
parents:
diff changeset
    67
    JExpression decr();
474761f14bca Initial load
duke
parents:
diff changeset
    68
474761f14bca Initial load
duke
parents:
diff changeset
    69
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    70
     * Returns "[this]+[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    71
     */
474761f14bca Initial load
duke
parents:
diff changeset
    72
    JExpression plus(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    73
474761f14bca Initial load
duke
parents:
diff changeset
    74
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    75
     * Returns "[this]-[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    76
     */
474761f14bca Initial load
duke
parents:
diff changeset
    77
    JExpression minus(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    78
474761f14bca Initial load
duke
parents:
diff changeset
    79
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    80
     * Returns "[this]*[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    81
     */
474761f14bca Initial load
duke
parents:
diff changeset
    82
    JExpression mul(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    83
474761f14bca Initial load
duke
parents:
diff changeset
    84
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    85
     * Returns "[this]/[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    86
     */
474761f14bca Initial load
duke
parents:
diff changeset
    87
    JExpression div(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    88
474761f14bca Initial load
duke
parents:
diff changeset
    89
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    90
     * Returns "[this]%[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    91
     */
474761f14bca Initial load
duke
parents:
diff changeset
    92
    JExpression mod(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    93
474761f14bca Initial load
duke
parents:
diff changeset
    94
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    95
     * Returns "[this]&lt;&lt;[right]"
474761f14bca Initial load
duke
parents:
diff changeset
    96
     */
474761f14bca Initial load
duke
parents:
diff changeset
    97
    JExpression shl(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
    98
474761f14bca Initial load
duke
parents:
diff changeset
    99
    /**
474761f14bca Initial load
duke
parents:
diff changeset
   100
     * Returns "[this]>>[right]"
474761f14bca Initial load
duke
parents:
diff changeset
   101
     */
474761f14bca Initial load
duke
parents:
diff changeset
   102
    JExpression shr(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   103
474761f14bca Initial load
duke
parents:
diff changeset
   104
    /**
474761f14bca Initial load
duke
parents:
diff changeset
   105
     * Returns "[this]>>>[right]"
474761f14bca Initial load
duke
parents:
diff changeset
   106
     */
474761f14bca Initial load
duke
parents:
diff changeset
   107
    JExpression shrz(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   108
474761f14bca Initial load
duke
parents:
diff changeset
   109
    /** Bit-wise AND '&amp;'. */
474761f14bca Initial load
duke
parents:
diff changeset
   110
    JExpression band(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   111
474761f14bca Initial load
duke
parents:
diff changeset
   112
    /** Bit-wise OR '|'. */
474761f14bca Initial load
duke
parents:
diff changeset
   113
    JExpression bor(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   114
474761f14bca Initial load
duke
parents:
diff changeset
   115
    /** Logical AND '&amp;&amp;'. */
474761f14bca Initial load
duke
parents:
diff changeset
   116
    JExpression cand(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   117
474761f14bca Initial load
duke
parents:
diff changeset
   118
    /** Logical OR '||'. */
474761f14bca Initial load
duke
parents:
diff changeset
   119
    JExpression cor(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   120
474761f14bca Initial load
duke
parents:
diff changeset
   121
    JExpression xor(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   122
    JExpression lt(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   123
    JExpression lte(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   124
    JExpression gt(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   125
    JExpression gte(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   126
    JExpression eq(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   127
    JExpression ne(JExpression right);
474761f14bca Initial load
duke
parents:
diff changeset
   128
474761f14bca Initial load
duke
parents:
diff changeset
   129
    /**
474761f14bca Initial load
duke
parents:
diff changeset
   130
     * Returns "[this] instanceof [right]"
474761f14bca Initial load
duke
parents:
diff changeset
   131
     */
474761f14bca Initial load
duke
parents:
diff changeset
   132
    JExpression _instanceof(JType right);
474761f14bca Initial load
duke
parents:
diff changeset
   133
474761f14bca Initial load
duke
parents:
diff changeset
   134
    /**
474761f14bca Initial load
duke
parents:
diff changeset
   135
     * Returns "[this].[method]".
474761f14bca Initial load
duke
parents:
diff changeset
   136
     *
474761f14bca Initial load
duke
parents:
diff changeset
   137
     * Arguments shall be added to the returned {@link JInvocation} object.
474761f14bca Initial load
duke
parents:
diff changeset
   138
     */
474761f14bca Initial load
duke
parents:
diff changeset
   139
    JInvocation invoke(JMethod method);
474761f14bca Initial load
duke
parents:
diff changeset
   140
474761f14bca Initial load
duke
parents:
diff changeset
   141
    /**
474761f14bca Initial load
duke
parents:
diff changeset
   142
     * Returns "[this].[method]".
474761f14bca Initial load
duke
parents:
diff changeset
   143
     *
474761f14bca Initial load
duke
parents:
diff changeset
   144
     * Arguments shall be added to the returned {@link JInvocation} object.
474761f14bca Initial load
duke
parents:
diff changeset
   145
     */
474761f14bca Initial load
duke
parents:
diff changeset
   146
    JInvocation invoke(String method);
474761f14bca Initial load
duke
parents:
diff changeset
   147
    JFieldRef ref(JVar field);
474761f14bca Initial load
duke
parents:
diff changeset
   148
    JFieldRef ref(String field);
474761f14bca Initial load
duke
parents:
diff changeset
   149
    JArrayCompRef component(JExpression index);
474761f14bca Initial load
duke
parents:
diff changeset
   150
}