/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Factory methods that generate various {@link JExpression}s.
*/
public abstract class JExpr {
/**
* This class is not instanciable.
*/
private JExpr() { }
}
}
return new JInvocation(c);
}
return new JInvocation(t);
}
}
}
}
}
}
}
}
}
return new JExpressionImpl() {
public void generate(JFormatter f) {
JClass c;
if(cl instanceof JNarrowedClass)
else
c = cl;
f.g(c).p(".class");
}
};
}
}
}
}
/**
* Generates {@code new T[size]}.
*
* @param type
* The type of the array component. 'T' or {@code new T[size]}.
*/
// you cannot create an array whose component type is a generic
}
/**
* Generates {@code new T[size]}.
*
* @param type
* The type of the array component. 'T' or {@code new T[size]}.
*/
}
/**
* Returns a reference to "this", an implicit reference
* to the current object.
*/
/**
* Returns a reference to "super", an implicit reference
* to the super class.
*/
/* -- Literals -- */
return __null;
}
/**
* Boolean constant that represents <code>true</code>
*/
/**
* Boolean constant that represents <code>false</code>
*/
}
}
}
if (f == Float.NEGATIVE_INFINITY)
{
return new JAtom("java.lang.Float.NEGATIVE_INFINITY");
}
else if (f == Float.POSITIVE_INFINITY)
{
return new JAtom("java.lang.Float.POSITIVE_INFINITY");
}
{
return new JAtom("java.lang.Float.NaN");
}
else
{
}
}
if (d == Double.NEGATIVE_INFINITY)
{
return new JAtom("java.lang.Double.NEGATIVE_INFINITY");
}
else if (d == Double.POSITIVE_INFINITY)
{
return new JAtom("java.lang.Double.POSITIVE_INFINITY");
}
{
return new JAtom("java.lang.Double.NaN");
}
else
{
}
}
/**
* Escapes the given string, then surrounds it by the specified
* quotation mark.
*/
int n = s.length();
for (int i = 0; i < n; i++) {
char c = s.charAt(i);
int j = charEscape.indexOf(c);
if(j>=0) {
} else {
}
} else {
// technically Unicode escape shouldn't be done here,
// for it's a lexical level handling.
//
// However, various tools are so broken around this area,
// so just to be on the safe side, it's better to do
// the escaping here (regardless of the actual file encoding)
//
// see bug
if( c<0x20 || 0x7E<c ) {
// not printable. use Unicode escape
} else {
}
}
}
}
}
return new JStringLiteral(s);
}
/**
* Creates an expression directly from a source code fragment.
*
* <p>
* This method can be used as a short-cut to create a JExpression.
* For example, instead of <code>_a.gt(_b)</code>, you can write
* it as: <code>JExpr.direct("a>b")</code>.
*
* <p>
* Be warned that there is a danger in using this method,
* as it obfuscates the object model.
*/
return new JExpressionImpl(){
public void generate( JFormatter f ) {
}
};
}
}