2010-11-10 19:03:09 +01:00
|
|
|
group JavaPrettyPrintTemplates;
|
|
|
|
|
|
|
|
itsmine(now, includeDate) ::= <<
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This file was translated from C# to Java by CS2J (http://www.cs2j.com).
|
|
|
|
//
|
|
|
|
// This code is to be used for evaluation of the CS2J tool ONLY.
|
|
|
|
//
|
|
|
|
// For more information about CS2J please contact cs2jcontact@scorm.com
|
|
|
|
<if(includeDate)>
|
|
|
|
//
|
|
|
|
// Translated: <now><\n>
|
|
|
|
<endif>
|
|
|
|
//
|
|
|
|
|
|
|
|
>>
|
|
|
|
|
2010-11-16 13:51:43 +01:00
|
|
|
package(now, includeDate, packageName, comments, modifiers, type, endComments) ::= <<
|
2010-11-10 19:03:09 +01:00
|
|
|
<itsmine(now=now,includeDate=includeDate)>
|
|
|
|
package <packageName>;
|
|
|
|
|
2010-11-13 19:11:47 +01:00
|
|
|
<comments; separator="\n">
|
2010-11-16 17:29:08 +01:00
|
|
|
<type>
|
2010-11-15 11:47:32 +01:00
|
|
|
|
|
|
|
<endComments; separator="\n">
|
2010-11-10 19:03:09 +01:00
|
|
|
>>
|
2010-11-16 13:51:43 +01:00
|
|
|
|
2010-11-16 17:29:08 +01:00
|
|
|
// ******* CLASSES ***********
|
|
|
|
|
2010-11-19 16:49:43 +01:00
|
|
|
class(modifiers, comments, attributes, name, typeparams, inherits, body) ::= <<
|
2010-11-16 17:29:08 +01:00
|
|
|
<comments; separator="\n">
|
2010-11-19 16:49:43 +01:00
|
|
|
<modifiers(modifiers)>class <name> <typeparams> <inherits>
|
2010-11-18 14:23:17 +01:00
|
|
|
{
|
|
|
|
<body>
|
|
|
|
}
|
|
|
|
>>
|
|
|
|
|
|
|
|
iface(modifiers, comments, attributes, name, imps, body) ::= <<
|
|
|
|
<comments; separator="\n">
|
|
|
|
<modifiers(modifiers)>interface <name> <imps>
|
2010-11-16 17:29:08 +01:00
|
|
|
{
|
|
|
|
<body>
|
|
|
|
}
|
|
|
|
>>
|
|
|
|
|
2010-11-20 15:29:39 +01:00
|
|
|
class_body(entries) ::= <<
|
|
|
|
<entries; separator="\n">
|
|
|
|
>>
|
|
|
|
|
|
|
|
class_member(comments, member) ::= <<
|
|
|
|
<comments; separator="\n">
|
|
|
|
<member>
|
|
|
|
>>
|
|
|
|
|
|
|
|
field(modifiers, type, field, comments) ::= "<comments><modifiers> <type> <field>;"
|
|
|
|
|
2010-11-19 16:49:43 +01:00
|
|
|
type_param_constraint(param, constraints) ::= "<param> extends <constraints; separator=\" & \">"
|
|
|
|
|
2010-11-16 17:29:08 +01:00
|
|
|
// ******* ENUMS ***********
|
2010-11-16 13:51:43 +01:00
|
|
|
|
2010-11-16 17:29:08 +01:00
|
|
|
enum(modifiers,comments, attributes, name, body) ::= <<
|
2010-11-16 13:51:43 +01:00
|
|
|
<comments; separator="\n">
|
2010-11-16 17:29:08 +01:00
|
|
|
<modifiers(modifiers)>enum <name>
|
2010-11-16 13:51:43 +01:00
|
|
|
{
|
|
|
|
<body>
|
|
|
|
}
|
|
|
|
>>
|
|
|
|
|
|
|
|
enum_body(values) ::= "<values; separator=\",\n\">"
|
|
|
|
|
|
|
|
enum_member(comments, value) ::= <<
|
|
|
|
<comments; separator="\n">
|
|
|
|
<value>
|
|
|
|
>>
|
|
|
|
|
2010-11-20 15:29:39 +01:00
|
|
|
type(name, rs, stars, opt) ::= "<name><rs><stars><opt>"
|
2010-11-18 14:23:17 +01:00
|
|
|
namespace_or_type(type1, type2, types) ::= "<type1><if(type2)>::<type2><endif><if(types)>.<types; separator=\".\"><endif>"
|
|
|
|
|
2010-11-16 17:29:08 +01:00
|
|
|
modifiers(mods) ::= "<mods; separator=\" \"><if(mods)> <endif>"
|
2010-11-18 14:23:17 +01:00
|
|
|
|
|
|
|
extends(types) ::= "<if(types)>extends <types; separator=\",\"><endif>"
|
|
|
|
imps(types) ::= "<if(types)>implements <types; separator=\",\"><endif>"
|
2010-11-16 13:51:43 +01:00
|
|
|
|
2010-11-16 17:29:08 +01:00
|
|
|
// ******* UTILITY ***********
|
2010-11-18 14:23:17 +01:00
|
|
|
string(payload) ::= "<payload>"
|