1 /* |
1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
100 setOpname(MUL, names.asterisk); |
100 setOpname(MUL, names.asterisk); |
101 setOpname(DIV, names.slash); |
101 setOpname(DIV, names.slash); |
102 setOpname(MOD, "%", names); |
102 setOpname(MOD, "%", names); |
103 } |
103 } |
104 |
104 |
|
105 public static List<JCExpression> args(JCTree t) { |
|
106 switch (t.getTag()) { |
|
107 case APPLY: |
|
108 return ((JCMethodInvocation)t).args; |
|
109 case NEWCLASS: |
|
110 return ((JCNewClass)t).args; |
|
111 default: |
|
112 return null; |
|
113 } |
|
114 } |
105 |
115 |
106 /** Return name of operator with given tree tag. |
116 /** Return name of operator with given tree tag. |
107 */ |
117 */ |
108 public Name operatorName(JCTree.Tag tag) { |
118 public Name operatorName(JCTree.Tag tag) { |
109 return opname[tag.operatorIndex()]; |
119 return opname[tag.operatorIndex()]; |