![JAR search and dependency download from the Maven repository](/logo.png)
com.incapture.rapgen.TTree Maven / Gradle / Ivy
// $ANTLR 3.5.2 /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g 2016-04-14 13:13:58
package com.incapture.rapgen;
import java.util.Collection;
import java.util.LinkedList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import com.incapture.rapgen.annotations.*;
import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import org.antlr.stringtemplate.*;
import org.antlr.stringtemplate.language.*;
import java.util.HashMap;
@SuppressWarnings("all")
public class TTree extends AbstractTTree {
public static final String[] tokenNames = new String[] {
"", "", "", "", "ADDRESSABLE", "API", "AT", "BANG",
"BEAN", "BOOLTYPE", "BYTEARRAYTYPE", "CACHEABLE", "CLOSESQUARE", "COLUMN",
"COMMA", "COMMENT", "CRUDTYPED", "DATA", "DATETYPE", "DEPRECATED", "DOC",
"DOT", "DOUBLETYPE", "DYNENT", "ENTITLE", "EQUAL", "EXTENDS", "FALSE",
"G_THAN", "ID", "INCLUDE", "INDEXED", "INT", "INTTYPE", "LBRAC", "LISTTYPE",
"LONGCTYPE", "LONGTYPE", "LPAREN", "L_THAN", "MAPTYPE", "MINUS", "NEW",
"OBJECTTYPE", "OPENSQUARE", "PACKAGE", "PACKAGENAME", "PRIVATE", "PUBLIC",
"RBRAC", "REGULARENTITLE", "RPAREN", "SCHEME", "SDKNAME", "SEMI", "SETTYPE",
"SQUOTE", "STORABLE", "STORAGE_PATH", "STREAMING", "STRING", "STRINGTYPE",
"TRUE", "TYPED", "VOIDTYPE", "WS", "APIENTRY", "APISEC", "CLASSTYPE",
"COMPLEX", "CRUDINFO", "CRUDINFOENTRY", "CRUDPACKAGEANNOTATION", "CRUDTYPEDEF",
"ENTITLEASPECT", "ENUM", "EXPR", "FIELD_CONSTRUCTOR", "FNNAME", "INDEX_COMPONENT",
"INDEX_NAME", "INNERA", "INNERC", "INNERT", "MAIN", "MEMBER", "MEMBERS",
"MINVERSIONDEF", "NAME", "PARAM", "PARAMS", "PRIVATEVIS", "PUBLICVIS",
"RAW", "RETTYPE", "SCRIPT", "SDKDEF", "STATEMENT", "STORABLE_ENCODING",
"STORABLE_PREFIX", "STORABLE_REPO_NAME", "STORABLE_SEPARATOR", "STORABLE_TTL_DAYS",
"STORAGE_PATH_ADDER", "STREAMINGASPECT", "TYPE", "TYPEASPECT", "TYPEDEF",
"TYPEFIELDS", "TYPEMEMBER", "VERSIONDEF", "VISIBILITY", "112", "113",
"114", "115", "116", "117", "118", "119", "120", "121", "122", "123",
"124", "125", "126", "127", "128", "129", "130", "131", "132", "133",
"134", "135", "136", "137", "138", "139"
};
public static final int EOF=-1;
public static final int ADDRESSABLE=4;
public static final int API=5;
public static final int AT=6;
public static final int BANG=7;
public static final int BEAN=8;
public static final int BOOLTYPE=9;
public static final int BYTEARRAYTYPE=10;
public static final int CACHEABLE=11;
public static final int CLOSESQUARE=12;
public static final int COLUMN=13;
public static final int COMMA=14;
public static final int COMMENT=15;
public static final int CRUDTYPED=16;
public static final int DATA=17;
public static final int DATETYPE=18;
public static final int DEPRECATED=19;
public static final int DOC=20;
public static final int DOT=21;
public static final int DOUBLETYPE=22;
public static final int DYNENT=23;
public static final int ENTITLE=24;
public static final int EQUAL=25;
public static final int EXTENDS=26;
public static final int FALSE=27;
public static final int G_THAN=28;
public static final int ID=29;
public static final int INCLUDE=30;
public static final int INDEXED=31;
public static final int INT=32;
public static final int INTTYPE=33;
public static final int LBRAC=34;
public static final int LISTTYPE=35;
public static final int LONGCTYPE=36;
public static final int LONGTYPE=37;
public static final int LPAREN=38;
public static final int L_THAN=39;
public static final int MAPTYPE=40;
public static final int MINUS=41;
public static final int NEW=42;
public static final int OBJECTTYPE=43;
public static final int OPENSQUARE=44;
public static final int PACKAGE=45;
public static final int PACKAGENAME=46;
public static final int PRIVATE=47;
public static final int PUBLIC=48;
public static final int RBRAC=49;
public static final int REGULARENTITLE=50;
public static final int RPAREN=51;
public static final int SCHEME=52;
public static final int SDKNAME=53;
public static final int SEMI=54;
public static final int SETTYPE=55;
public static final int SQUOTE=56;
public static final int STORABLE=57;
public static final int STORAGE_PATH=58;
public static final int STREAMING=59;
public static final int STRING=60;
public static final int STRINGTYPE=61;
public static final int TRUE=62;
public static final int TYPED=63;
public static final int VOIDTYPE=64;
public static final int WS=65;
public static final int APIENTRY=66;
public static final int APISEC=67;
public static final int CLASSTYPE=68;
public static final int COMPLEX=69;
public static final int CRUDINFO=70;
public static final int CRUDINFOENTRY=71;
public static final int CRUDPACKAGEANNOTATION=72;
public static final int CRUDTYPEDEF=73;
public static final int ENTITLEASPECT=74;
public static final int ENUM=75;
public static final int EXPR=76;
public static final int FIELD_CONSTRUCTOR=77;
public static final int FNNAME=78;
public static final int INDEX_COMPONENT=79;
public static final int INDEX_NAME=80;
public static final int INNERA=81;
public static final int INNERC=82;
public static final int INNERT=83;
public static final int MAIN=84;
public static final int MEMBER=85;
public static final int MEMBERS=86;
public static final int MINVERSIONDEF=87;
public static final int NAME=88;
public static final int PARAM=89;
public static final int PARAMS=90;
public static final int PRIVATEVIS=91;
public static final int PUBLICVIS=92;
public static final int RAW=93;
public static final int RETTYPE=94;
public static final int SCRIPT=95;
public static final int SDKDEF=96;
public static final int STATEMENT=97;
public static final int STORABLE_ENCODING=98;
public static final int STORABLE_PREFIX=99;
public static final int STORABLE_REPO_NAME=100;
public static final int STORABLE_SEPARATOR=101;
public static final int STORABLE_TTL_DAYS=102;
public static final int STORAGE_PATH_ADDER=103;
public static final int STREAMINGASPECT=104;
public static final int TYPE=105;
public static final int TYPEASPECT=106;
public static final int TYPEDEF=107;
public static final int TYPEFIELDS=108;
public static final int TYPEMEMBER=109;
public static final int VERSIONDEF=110;
public static final int VISIBILITY=111;
// delegates
public TTree_TTreeShared gTTreeShared;
public AbstractTTree[] getDelegates() {
return new AbstractTTree[] {gTTreeShared};
}
// delegators
public TTree(TreeNodeStream input) {
this(input, new RecognizerSharedState());
}
public TTree(TreeNodeStream input, RecognizerSharedState state) {
super(input, state);
gTTreeShared = new TTree_TTreeShared(input, state, this);
}
protected StringTemplateGroup templateLib =
new StringTemplateGroup("TTreeTemplates", AngleBracketTemplateLexer.class);
public void setTemplateLib(StringTemplateGroup templateLib) {
this.templateLib = templateLib;
}
public StringTemplateGroup getTemplateLib() {
return templateLib;
}
/** allows convenient multi-value initialization:
* "new STAttrMap().put(...).put(...)"
*/
@SuppressWarnings("serial")
public static class STAttrMap extends HashMap {
public STAttrMap put(String attrName, Object value) {
super.put(attrName, value);
return this;
}
}
@Override public String[] getTokenNames() { return TTree.tokenNames; }
@Override public String getGrammarFileName() { return "/Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g"; }
boolean isSdkExpected = false;
String sdkName;
public static class innerExpr_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "innerExpr"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:33:1: innerExpr : ( ^( INNERT typeExpr ) | ^( INNERC crudTypeExpr ) | ^( INNERA a= apiExpr ) );
public final TTree.innerExpr_return innerExpr() throws RecognitionException {
TTree.innerExpr_return retval = new TTree.innerExpr_return();
retval.start = input.LT(1);
TreeRuleReturnScope a =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:33:11: ( ^( INNERT typeExpr ) | ^( INNERC crudTypeExpr ) | ^( INNERA a= apiExpr ) )
int alt1=3;
switch ( input.LA(1) ) {
case INNERT:
{
alt1=1;
}
break;
case INNERC:
{
alt1=2;
}
break;
case INNERA:
{
alt1=3;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:33:13: ^( INNERT typeExpr )
{
match(input,INNERT,FOLLOW_INNERT_in_innerExpr98);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_typeExpr_in_innerExpr100);
typeExpr();
state._fsp--;
match(input, Token.UP, null);
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:34:15: ^( INNERC crudTypeExpr )
{
match(input,INNERC,FOLLOW_INNERC_in_innerExpr118);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_crudTypeExpr_in_innerExpr120);
crudTypeExpr();
state._fsp--;
match(input, Token.UP, null);
System.out.println("CRUD TYPE EXPR");
}
break;
case 3 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:35:15: ^( INNERA a= apiExpr )
{
match(input,INNERA,FOLLOW_INNERA_in_innerExpr141);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_apiExpr_in_innerExpr145);
a=apiExpr();
state._fsp--;
hmxdef_stack.peek().ents.add((a!=null?((TTree.apiExpr_return)a).entList:null)); hmxdef_stack.peek().kEntries.add((a!=null?((TTree.apiExpr_return)a).kEntry:null)); hmxdef_stack.peek().kSetups.add((a!=null?((TTree.apiExpr_return)a).kSetup:null));
match(input, Token.UP, null);
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "innerExpr"
public static class sdkGen_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "sdkGen"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:39:1: sdkGen : hmxdef ;
public final TTree.sdkGen_return sdkGen() throws RecognitionException {
TTree.sdkGen_return retval = new TTree.sdkGen_return();
retval.start = input.LT(1);
isSdkExpected = true;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:43:5: ( hmxdef )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:43:7: hmxdef
{
pushFollow(FOLLOW_hmxdef_in_sdkGen171);
hmxdef();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "sdkGen"
public static class apiGen_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "apiGen"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:46:1: apiGen : hmxdef ;
public final TTree.apiGen_return apiGen() throws RecognitionException {
TTree.apiGen_return retval = new TTree.apiGen_return();
retval.start = input.LT(1);
isSdkExpected = false;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:50:5: ( hmxdef )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:50:7: hmxdef
{
pushFollow(FOLLOW_hmxdef_in_apiGen193);
hmxdef();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "apiGen"
protected static class hmxdef_scope {
List ents;
List kEntries;
List kSetups;
}
protected Stack hmxdef_stack = new Stack();
public static class hmxdef_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "hmxdef"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:53:1: hmxdef : ^( MAIN ( sdkExpr )? versionExpr minVerExpr ( innerExpr )* ) ;
public final TTree.hmxdef_return hmxdef() throws RecognitionException {
hmxdef_stack.push(new hmxdef_scope());
TTree.hmxdef_return retval = new TTree.hmxdef_return();
retval.start = input.LT(1);
TreeRuleReturnScope sdkExpr1 =null;
TreeRuleReturnScope versionExpr2 =null;
TreeRuleReturnScope minVerExpr3 =null;
sdkName = null;
hmxdef_stack.peek().ents = new ArrayList();
hmxdef_stack.peek().kEntries = new ArrayList();
hmxdef_stack.peek().kSetups = new ArrayList();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:65:5: ( ^( MAIN ( sdkExpr )? versionExpr minVerExpr ( innerExpr )* ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:65:7: ^( MAIN ( sdkExpr )? versionExpr minVerExpr ( innerExpr )* )
{
match(input,MAIN,FOLLOW_MAIN_in_hmxdef225);
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:65:14: ( sdkExpr )?
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==SDKDEF) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:65:15: sdkExpr
{
pushFollow(FOLLOW_sdkExpr_in_hmxdef228);
sdkExpr1=sdkExpr();
state._fsp--;
sdkName = (sdkExpr1!=null?((TTree.sdkExpr_return)sdkExpr1).name:null);
}
break;
}
if (isSdkExpected && sdkName == null) {
throw new IllegalArgumentException("Error: SDK Name is required for this grammar");
}
else if (!isSdkExpected && sdkName != null) {
throw new IllegalArgumentException("Error: SDK Name is not expected in this grammar, but found: " + sdkName);
}
pushFollow(FOLLOW_versionExpr_in_hmxdef252);
versionExpr2=versionExpr();
state._fsp--;
pushFollow(FOLLOW_minVerExpr_in_hmxdef254);
minVerExpr3=minVerExpr();
state._fsp--;
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:74:32: ( innerExpr )*
loop3:
while (true) {
int alt3=2;
int LA3_0 = input.LA(1);
if ( ((LA3_0 >= INNERA && LA3_0 <= INNERT)) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:74:32: innerExpr
{
pushFollow(FOLLOW_innerExpr_in_hmxdef256);
innerExpr();
state._fsp--;
}
break;
default :
break loop3;
}
}
match(input, Token.UP, null);
processHmxdef(sdkName, hmxdef_stack.peek().ents, hmxdef_stack.peek().kEntries, hmxdef_stack.peek().kSetups, (versionExpr2!=null?((TTree_TTreeShared.versionExpr_return)versionExpr2).major:0), (versionExpr2!=null?((TTree_TTreeShared.versionExpr_return)versionExpr2).minor:0), (versionExpr2!=null?((TTree_TTreeShared.versionExpr_return)versionExpr2).micro:0), (minVerExpr3!=null?((TTree_TTreeShared.minVerExpr_return)minVerExpr3).major:0), (minVerExpr3!=null?((TTree_TTreeShared.minVerExpr_return)minVerExpr3).minor:0), (minVerExpr3!=null?((TTree_TTreeShared.minVerExpr_return)minVerExpr3).micro:0));
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
hmxdef_stack.pop();
}
return retval;
}
// $ANTLR end "hmxdef"
public static class sdkExpr_return extends TreeRuleReturnScope {
public String name;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "sdkExpr"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:78:1: sdkExpr returns [String name] : ^( SDKDEF ID ) ;
public final TTree.sdkExpr_return sdkExpr() throws RecognitionException {
TTree.sdkExpr_return retval = new TTree.sdkExpr_return();
retval.start = input.LT(1);
CommonTree ID4=null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:78:30: ( ^( SDKDEF ID ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:78:32: ^( SDKDEF ID )
{
match(input,SDKDEF,FOLLOW_SDKDEF_in_sdkExpr281);
match(input, Token.DOWN, null);
ID4=(CommonTree)match(input,ID,FOLLOW_ID_in_sdkExpr283);
match(input, Token.UP, null);
retval.name = (ID4!=null?ID4.getText():null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "sdkExpr"
protected static class crudTypeExpr_scope {
String crudTypeName;
BeanAnnotation bean;
AddressableAnnotation addressable;
StorableAnnotation storable;
ExtendsAnnotation extend;
DeprecatedAnnotation deprecated;
}
protected Stack crudTypeExpr_stack = new Stack();
public static class crudTypeExpr_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "crudTypeExpr"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:80:1: crudTypeExpr : ^( CRUDTYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | beanAnnotation )* ( crudPackageAnnotation )? name= ID crudTypeInfo typeFields ) ;
public final TTree.crudTypeExpr_return crudTypeExpr() throws RecognitionException {
crudTypeExpr_stack.push(new crudTypeExpr_scope());
TTree.crudTypeExpr_return retval = new TTree.crudTypeExpr_return();
retval.start = input.LT(1);
CommonTree doc=null;
CommonTree name=null;
TreeRuleReturnScope addressableAnnotation5 =null;
TreeRuleReturnScope storableAnnotation6 =null;
TreeRuleReturnScope extendsAnnotation7 =null;
TreeRuleReturnScope deprecatedAnnotation8 =null;
TreeRuleReturnScope beanAnnotation9 =null;
TreeRuleReturnScope crudPackageAnnotation10 =null;
TreeRuleReturnScope typeFields11 =null;
TreeRuleReturnScope crudTypeInfo12 =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:87:7: ( ^( CRUDTYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | beanAnnotation )* ( crudPackageAnnotation )? name= ID crudTypeInfo typeFields ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:88:5: ^( CRUDTYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | beanAnnotation )* ( crudPackageAnnotation )? name= ID crudTypeInfo typeFields )
{
match(input,CRUDTYPEDEF,FOLLOW_CRUDTYPEDEF_in_crudTypeExpr303);
match(input, Token.DOWN, null);
doc=(CommonTree)match(input,DOC,FOLLOW_DOC_in_crudTypeExpr307);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:89:9: ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | beanAnnotation )*
loop4:
while (true) {
int alt4=6;
switch ( input.LA(1) ) {
case ADDRESSABLE:
{
alt4=1;
}
break;
case STORABLE:
{
alt4=2;
}
break;
case EXTENDS:
{
alt4=3;
}
break;
case DEPRECATED:
{
alt4=4;
}
break;
case BEAN:
{
alt4=5;
}
break;
}
switch (alt4) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:90:13: addressableAnnotation
{
pushFollow(FOLLOW_addressableAnnotation_in_crudTypeExpr331);
addressableAnnotation5=addressableAnnotation();
state._fsp--;
crudTypeExpr_stack.peek().addressable = (addressableAnnotation5!=null?((TTree_TTreeShared.addressableAnnotation_return)addressableAnnotation5).result:null);
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:93:13: storableAnnotation
{
pushFollow(FOLLOW_storableAnnotation_in_crudTypeExpr347);
storableAnnotation6=storableAnnotation();
state._fsp--;
crudTypeExpr_stack.peek().storable = (storableAnnotation6!=null?((TTree_TTreeShared.storableAnnotation_return)storableAnnotation6).result:null);
}
break;
case 3 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:96:13: extendsAnnotation
{
pushFollow(FOLLOW_extendsAnnotation_in_crudTypeExpr363);
extendsAnnotation7=extendsAnnotation();
state._fsp--;
crudTypeExpr_stack.peek().extend = (extendsAnnotation7!=null?((TTree_TTreeShared.extendsAnnotation_return)extendsAnnotation7).result:null);
}
break;
case 4 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:99:13: deprecatedAnnotation
{
pushFollow(FOLLOW_deprecatedAnnotation_in_crudTypeExpr379);
deprecatedAnnotation8=deprecatedAnnotation();
state._fsp--;
crudTypeExpr_stack.peek().deprecated = (deprecatedAnnotation8!=null?((TTree_TTreeShared.deprecatedAnnotation_return)deprecatedAnnotation8).result:null);
}
break;
case 5 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:102:13: beanAnnotation
{
pushFollow(FOLLOW_beanAnnotation_in_crudTypeExpr395);
beanAnnotation9=beanAnnotation();
state._fsp--;
crudTypeExpr_stack.peek().bean = (beanAnnotation9!=null?((TTree_TTreeShared.beanAnnotation_return)beanAnnotation9).result:null);
}
break;
default :
break loop4;
}
}
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:106:9: ( crudPackageAnnotation )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==CRUDPACKAGEANNOTATION) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:106:9: crudPackageAnnotation
{
pushFollow(FOLLOW_crudPackageAnnotation_in_crudTypeExpr418);
crudPackageAnnotation10=crudPackageAnnotation();
state._fsp--;
}
break;
}
name=(CommonTree)match(input,ID,FOLLOW_ID_in_crudTypeExpr423);
crudTypeExpr_stack.peek().crudTypeName = (name!=null?name.getText():null);
pushFollow(FOLLOW_crudTypeInfo_in_crudTypeExpr427);
crudTypeInfo12=crudTypeInfo();
state._fsp--;
pushFollow(FOLLOW_typeFields_in_crudTypeExpr429);
typeFields11=typeFields();
state._fsp--;
match(input, Token.UP, null);
// We need to generate
// (1) A bean document for this type
// (2) A special API subsection for this type (with get, put, delete, getChildren type calls) (so that should be registerd in the same way as an API)
// (3) The implementation for this API in the Kernel code (special for this crud type)
// (4) Potentially a nice client set of classes to make it easier to interact with this type
String packageToUse = (crudPackageAnnotation10!=null?((TTree.crudPackageAnnotation_return)crudPackageAnnotation10).pkg:null) == null ? "rapture.common" : (crudPackageAnnotation10!=null?((TTree.crudPackageAnnotation_return)crudPackageAnnotation10).pkg:null);
addTypeImport((name!=null?name.getText():null), packageToUse);
StringTemplate debugMeth = getDebugMethod((typeFields11!=null?((TTree.typeFields_return)typeFields11).fieldNameToType:null).keySet());
Collection importList = ImporterRegistry.getImportList((typeFields11!=null?((TTree.typeFields_return)typeFields11).fieldNameToType:null).values());
StringTemplate beanClass = templateLib.getInstanceOf("beanClass",new STAttrMap().put("name", (name!=null?name.getText():null)).put("fields", (typeFields11!=null?((TTree.typeFields_return)typeFields11).beans:null)).put("adders", (crudTypeInfo12!=null?((TTree.crudTypeInfo_return)crudTypeInfo12).storageAdders:null)).put("package", packageToUse).put("debugMethod", debugMeth).put("storable", crudTypeExpr_stack.peek().storable).put("importList", importList));
String packagePath = packageToUse.replaceAll("\\.", "/");
String apiFullPath = "build/generated-sources/main/java/" + packagePath + "/" + (name!=null?name.getText():null) + ".java";
addApiTemplate(apiFullPath, "1", beanClass);
StringTemplate builderClass = templateLib.getInstanceOf("beanBuilderClass",new STAttrMap().put("sdkName", sdkName).put("name", (name!=null?name.getText():null)).put("fields", (crudTypeInfo12!=null?((TTree.crudTypeInfo_return)crudTypeInfo12).builderAdders:null)).put("adders", (crudTypeInfo12!=null?((TTree.crudTypeInfo_return)crudTypeInfo12).builderEntries:null)).put("package", packageToUse));
String apiBuilderFullPath = "build/generated-sources/main/java/" + packagePath + "/" + (name!=null?name.getText():null) + "PathBuilder.java";
addApiTemplate(apiBuilderFullPath, "1", builderClass);
String crudApiImplPackage = "rapture." + sdkName + ".kernel";
StringTemplate crudApiImpl = templateLib.getInstanceOf("crudApiImpl",new STAttrMap().put("name", (name!=null?name.getText():null)).put("package", crudApiImplPackage).put("typePackage", packageToUse));
String crudApiImplFullPath = "build/generated-sources/main/java/rapture/" + sdkName + "/kernel/" + (name!=null?name.getText():null) + "ApiImpl.java";
addKernelTemplate(crudApiImplFullPath, "1", crudApiImpl);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
crudTypeExpr_stack.pop();
}
return retval;
}
// $ANTLR end "crudTypeExpr"
public static class crudTypeInfo_return extends TreeRuleReturnScope {
public List storageAdders;
public List builderAdders;
public List builderEntries;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "crudTypeInfo"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:133:1: crudTypeInfo returns [List storageAdders, List builderAdders, List builderEntries] : ^( CRUDINFO ( crudDirective )* ) ;
public final TTree.crudTypeInfo_return crudTypeInfo() throws RecognitionException {
TTree.crudTypeInfo_return retval = new TTree.crudTypeInfo_return();
retval.start = input.LT(1);
TreeRuleReturnScope crudDirective13 =null;
retval.storageAdders = new ArrayList(); retval.builderAdders = new ArrayList(); retval.builderEntries = new ArrayList();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:135:5: ( ^( CRUDINFO ( crudDirective )* ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:135:7: ^( CRUDINFO ( crudDirective )* )
{
match(input,CRUDINFO,FOLLOW_CRUDINFO_in_crudTypeInfo458);
if ( input.LA(1)==Token.DOWN ) {
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:135:18: ( crudDirective )*
loop6:
while (true) {
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==CRUDINFOENTRY) ) {
alt6=1;
}
switch (alt6) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:135:19: crudDirective
{
pushFollow(FOLLOW_crudDirective_in_crudTypeInfo461);
crudDirective13=crudDirective();
state._fsp--;
retval.storageAdders.add((crudDirective13!=null?((TTree.crudDirective_return)crudDirective13).storageAdder:null));
retval.builderAdders.add((crudDirective13!=null?((TTree.crudDirective_return)crudDirective13).storageBuilder:null));
retval.builderEntries.add((crudDirective13!=null?((TTree.crudDirective_return)crudDirective13).builderAdder:null));
}
break;
default :
break loop6;
}
}
match(input, Token.UP, null);
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "crudTypeInfo"
public static class crudDirective_return extends TreeRuleReturnScope {
public StringTemplate storageAdder;
public StringTemplate storageBuilder;
public StringTemplate builderAdder;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "crudDirective"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:140:1: crudDirective returns [StringTemplate storageAdder, StringTemplate storageBuilder, StringTemplate builderAdder] : ^( CRUDINFOENTRY n= ID ) ;
public final TTree.crudDirective_return crudDirective() throws RecognitionException {
TTree.crudDirective_return retval = new TTree.crudDirective_return();
retval.start = input.LT(1);
CommonTree n=null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:140:113: ( ^( CRUDINFOENTRY n= ID ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:140:115: ^( CRUDINFOENTRY n= ID )
{
match(input,CRUDINFOENTRY,FOLLOW_CRUDINFOENTRY_in_crudDirective479);
match(input, Token.DOWN, null);
n=(CommonTree)match(input,ID,FOLLOW_ID_in_crudDirective483);
match(input, Token.UP, null);
retval.storageAdder = templateLib.getInstanceOf("storageAdder",new STAttrMap().put("name", (n!=null?n.getText():null)));
retval.storageBuilder = templateLib.getInstanceOf("builderEntry",new STAttrMap().put("fieldName", (n!=null?n.getText():null)).put("name", crudTypeExpr_stack.peek().crudTypeName).put("fieldType", "String"));
retval.builderAdder = templateLib.getInstanceOf("builderAdder",new STAttrMap().put("name", (n!=null?n.getText():null)).put("separator", "\"/\""));
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "crudDirective"
protected static class typeExpr_scope {
BeanAnnotation bean;
AddressableAnnotation addressable;
StorableAnnotation storable;
ExtendsAnnotation extend;
DeprecatedAnnotation deprecated;
List indices;
CacheableAnnotation cacheable;
}
protected Stack typeExpr_stack = new Stack();
public static class typeExpr_return extends TreeRuleReturnScope {
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "typeExpr"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:146:1: typeExpr : ^( TYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | indexedAnnotation | beanAnnotation | cacheableAnnotation )* name= ID typeAspect typeFields ) ;
public final TTree.typeExpr_return typeExpr() throws RecognitionException {
typeExpr_stack.push(new typeExpr_scope());
TTree.typeExpr_return retval = new TTree.typeExpr_return();
retval.start = input.LT(1);
CommonTree doc=null;
CommonTree name=null;
TreeRuleReturnScope addressableAnnotation14 =null;
TreeRuleReturnScope storableAnnotation15 =null;
TreeRuleReturnScope extendsAnnotation16 =null;
TreeRuleReturnScope deprecatedAnnotation17 =null;
TreeRuleReturnScope indexedAnnotation18 =null;
TreeRuleReturnScope beanAnnotation19 =null;
TreeRuleReturnScope cacheableAnnotation20 =null;
TreeRuleReturnScope typeAspect21 =null;
TreeRuleReturnScope typeFields22 =null;
typeExpr_stack.peek().indices = new LinkedList<>();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:159:5: ( ^( TYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | indexedAnnotation | beanAnnotation | cacheableAnnotation )* name= ID typeAspect typeFields ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:160:5: ^( TYPEDEF doc= DOC ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | indexedAnnotation | beanAnnotation | cacheableAnnotation )* name= ID typeAspect typeFields )
{
match(input,TYPEDEF,FOLLOW_TYPEDEF_in_typeExpr520);
match(input, Token.DOWN, null);
doc=(CommonTree)match(input,DOC,FOLLOW_DOC_in_typeExpr524);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:161:9: ( addressableAnnotation | storableAnnotation | extendsAnnotation | deprecatedAnnotation | indexedAnnotation | beanAnnotation | cacheableAnnotation )*
loop7:
while (true) {
int alt7=8;
switch ( input.LA(1) ) {
case ADDRESSABLE:
{
alt7=1;
}
break;
case STORABLE:
{
alt7=2;
}
break;
case EXTENDS:
{
alt7=3;
}
break;
case DEPRECATED:
{
alt7=4;
}
break;
case INDEXED:
{
alt7=5;
}
break;
case BEAN:
{
alt7=6;
}
break;
case CACHEABLE:
{
alt7=7;
}
break;
}
switch (alt7) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:162:13: addressableAnnotation
{
pushFollow(FOLLOW_addressableAnnotation_in_typeExpr549);
addressableAnnotation14=addressableAnnotation();
state._fsp--;
typeExpr_stack.peek().addressable = (addressableAnnotation14!=null?((TTree_TTreeShared.addressableAnnotation_return)addressableAnnotation14).result:null);
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:165:13: storableAnnotation
{
pushFollow(FOLLOW_storableAnnotation_in_typeExpr565);
storableAnnotation15=storableAnnotation();
state._fsp--;
typeExpr_stack.peek().storable = (storableAnnotation15!=null?((TTree_TTreeShared.storableAnnotation_return)storableAnnotation15).result:null);
}
break;
case 3 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:168:13: extendsAnnotation
{
pushFollow(FOLLOW_extendsAnnotation_in_typeExpr581);
extendsAnnotation16=extendsAnnotation();
state._fsp--;
typeExpr_stack.peek().extend = (extendsAnnotation16!=null?((TTree_TTreeShared.extendsAnnotation_return)extendsAnnotation16).result:null);
}
break;
case 4 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:171:13: deprecatedAnnotation
{
pushFollow(FOLLOW_deprecatedAnnotation_in_typeExpr597);
deprecatedAnnotation17=deprecatedAnnotation();
state._fsp--;
typeExpr_stack.peek().deprecated = (deprecatedAnnotation17!=null?((TTree_TTreeShared.deprecatedAnnotation_return)deprecatedAnnotation17).result:null);
}
break;
case 5 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:174:13: indexedAnnotation
{
pushFollow(FOLLOW_indexedAnnotation_in_typeExpr613);
indexedAnnotation18=indexedAnnotation();
state._fsp--;
typeExpr_stack.peek().indices.add((indexedAnnotation18!=null?((TTree_TTreeShared.indexedAnnotation_return)indexedAnnotation18).result:null));
}
break;
case 6 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:177:13: beanAnnotation
{
pushFollow(FOLLOW_beanAnnotation_in_typeExpr629);
beanAnnotation19=beanAnnotation();
state._fsp--;
typeExpr_stack.peek().bean = (beanAnnotation19!=null?((TTree_TTreeShared.beanAnnotation_return)beanAnnotation19).result:null);
}
break;
case 7 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:180:13: cacheableAnnotation
{
pushFollow(FOLLOW_cacheableAnnotation_in_typeExpr645);
cacheableAnnotation20=cacheableAnnotation();
state._fsp--;
typeExpr_stack.peek().cacheable = (cacheableAnnotation20!=null?((TTree_TTreeShared.cacheableAnnotation_return)cacheableAnnotation20).result:null);
}
break;
default :
break loop7;
}
}
name=(CommonTree)match(input,ID,FOLLOW_ID_in_typeExpr670);
pushFollow(FOLLOW_typeAspect_in_typeExpr672);
typeAspect21=typeAspect();
state._fsp--;
pushFollow(FOLLOW_typeFields_in_typeExpr674);
typeFields22=typeFields();
state._fsp--;
match(input, Token.UP, null);
// Record the type for later use, also build class for it
addType((name!=null?name.getText():null), (typeAspect21!=null?((TTree.typeAspect_return)typeAspect21).name:null), typeExpr_stack.peek().bean, typeExpr_stack.peek().cacheable, typeExpr_stack.peek().addressable, typeExpr_stack.peek().storable, typeExpr_stack.peek().extend, typeExpr_stack.peek().deprecated, typeExpr_stack.peek().indices, sdkName, (typeFields22!=null?((TTree.typeFields_return)typeFields22).fieldNameToType:null),
(typeFields22!=null?((TTree.typeFields_return)typeFields22).beans:null), (typeFields22!=null?((TTree.typeFields_return)typeFields22).constructors:null));
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
typeExpr_stack.pop();
}
return retval;
}
// $ANTLR end "typeExpr"
public static class typeAspect_return extends TreeRuleReturnScope {
public String name;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "typeAspect"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:190:1: typeAspect returns [String name] : ^( TYPEASPECT p= PACKAGENAME ) ;
public final TTree.typeAspect_return typeAspect() throws RecognitionException {
TTree.typeAspect_return retval = new TTree.typeAspect_return();
retval.start = input.LT(1);
CommonTree p=null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:190:33: ( ^( TYPEASPECT p= PACKAGENAME ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:191:5: ^( TYPEASPECT p= PACKAGENAME )
{
match(input,TYPEASPECT,FOLLOW_TYPEASPECT_in_typeAspect694);
match(input, Token.DOWN, null);
p=(CommonTree)match(input,PACKAGENAME,FOLLOW_PACKAGENAME_in_typeAspect698);
match(input, Token.UP, null);
retval.name = (p!=null?p.getText():null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "typeAspect"
public static class crudPackageAnnotation_return extends TreeRuleReturnScope {
public String pkg;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "crudPackageAnnotation"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:193:1: crudPackageAnnotation returns [String pkg] : ^( CRUDPACKAGEANNOTATION p= PACKAGENAME ) ;
public final TTree.crudPackageAnnotation_return crudPackageAnnotation() throws RecognitionException {
TTree.crudPackageAnnotation_return retval = new TTree.crudPackageAnnotation_return();
retval.start = input.LT(1);
CommonTree p=null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:193:43: ( ^( CRUDPACKAGEANNOTATION p= PACKAGENAME ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:194:5: ^( CRUDPACKAGEANNOTATION p= PACKAGENAME )
{
match(input,CRUDPACKAGEANNOTATION,FOLLOW_CRUDPACKAGEANNOTATION_in_crudPackageAnnotation717);
match(input, Token.DOWN, null);
p=(CommonTree)match(input,PACKAGENAME,FOLLOW_PACKAGENAME_in_crudPackageAnnotation721);
match(input, Token.UP, null);
retval.pkg = (p!=null?p.getText():null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "crudPackageAnnotation"
public static class deprecatedAspect_return extends TreeRuleReturnScope {
public String reason;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "deprecatedAspect"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:196:1: deprecatedAspect returns [String reason] : ( ( DEPRECATED ID ) | ( DEPRECATED STRING ) );
public final TTree.deprecatedAspect_return deprecatedAspect() throws RecognitionException {
TTree.deprecatedAspect_return retval = new TTree.deprecatedAspect_return();
retval.start = input.LT(1);
CommonTree ID23=null;
CommonTree STRING24=null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:198:5: ( ( DEPRECATED ID ) | ( DEPRECATED STRING ) )
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==DEPRECATED) ) {
int LA8_1 = input.LA(2);
if ( (LA8_1==ID) ) {
alt8=1;
}
else if ( (LA8_1==STRING) ) {
alt8=2;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 8, 1, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 8, 0, input);
throw nvae;
}
switch (alt8) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:198:7: ( DEPRECATED ID )
{
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:198:7: ( DEPRECATED ID )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:198:9: DEPRECATED ID
{
match(input,DEPRECATED,FOLLOW_DEPRECATED_in_deprecatedAspect743);
ID23=(CommonTree)match(input,ID,FOLLOW_ID_in_deprecatedAspect745);
retval.reason = (ID23!=null?ID23.getText():null);
}
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:199:7: ( DEPRECATED STRING )
{
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:199:7: ( DEPRECATED STRING )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:199:9: DEPRECATED STRING
{
match(input,DEPRECATED,FOLLOW_DEPRECATED_in_deprecatedAspect760);
STRING24=(CommonTree)match(input,STRING,FOLLOW_STRING_in_deprecatedAspect762);
retval.reason = (STRING24!=null?STRING24.getText():null).substring(1, (STRING24!=null?STRING24.getText():null).length() -1);
}
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "deprecatedAspect"
public static class typeFields_return extends TreeRuleReturnScope {
public Map fieldNameToType;
public List beans;
public List constructors;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "typeFields"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:202:1: typeFields returns [Map fieldNameToType, List beans, List constructors ] : ^( TYPEFIELDS ( typeFieldDef )* ) ;
public final TTree.typeFields_return typeFields() throws RecognitionException {
TTree.typeFields_return retval = new TTree.typeFields_return();
retval.start = input.LT(1);
TreeRuleReturnScope typeFieldDef25 =null;
retval.fieldNameToType = new HashMap();
retval.beans = new ArrayList();
retval.constructors = new ArrayList();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:208:5: ( ^( TYPEFIELDS ( typeFieldDef )* ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:209:5: ^( TYPEFIELDS ( typeFieldDef )* )
{
match(input,TYPEFIELDS,FOLLOW_TYPEFIELDS_in_typeFields804);
if ( input.LA(1)==Token.DOWN ) {
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:210:9: ( typeFieldDef )*
loop9:
while (true) {
int alt9=2;
int LA9_0 = input.LA(1);
if ( (LA9_0==TYPEMEMBER) ) {
alt9=1;
}
switch (alt9) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:210:10: typeFieldDef
{
pushFollow(FOLLOW_typeFieldDef_in_typeFields816);
typeFieldDef25=typeFieldDef();
state._fsp--;
retval.fieldNameToType.put((typeFieldDef25!=null?((TTree.typeFieldDef_return)typeFieldDef25).fieldName:null), (typeFieldDef25!=null?((TTree.typeFieldDef_return)typeFieldDef25).varType:null));
retval.beans.add((typeFieldDef25!=null?((TTree.typeFieldDef_return)typeFieldDef25).beanInfo:null));
if ((typeFieldDef25!=null?((TTree.typeFieldDef_return)typeFieldDef25).constructor:null) != null) {
retval.constructors.add((typeFieldDef25!=null?((TTree.typeFieldDef_return)typeFieldDef25).constructor:null));
}
}
break;
default :
break loop9;
}
}
match(input, Token.UP, null);
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "typeFields"
public static class typeFieldDef_return extends TreeRuleReturnScope {
public String fieldName;
public StringTemplate beanInfo;
public String varType;
public String constructor;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "typeFieldDef"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:220:1: typeFieldDef returns [String fieldName, StringTemplate beanInfo, String varType, String constructor] : ^( TYPEMEMBER ^( TYPE vartype ) ^( NAME name= ID ) ^( FIELD_CONSTRUCTOR ( fieldConstructor )? ) ) ;
public final TTree.typeFieldDef_return typeFieldDef() throws RecognitionException {
TTree.typeFieldDef_return retval = new TTree.typeFieldDef_return();
retval.start = input.LT(1);
CommonTree name=null;
TreeRuleReturnScope fieldConstructor26 =null;
TreeRuleReturnScope vartype27 =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:221:5: ( ^( TYPEMEMBER ^( TYPE vartype ) ^( NAME name= ID ) ^( FIELD_CONSTRUCTOR ( fieldConstructor )? ) ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:222:5: ^( TYPEMEMBER ^( TYPE vartype ) ^( NAME name= ID ) ^( FIELD_CONSTRUCTOR ( fieldConstructor )? ) )
{
match(input,TYPEMEMBER,FOLLOW_TYPEMEMBER_in_typeFieldDef853);
match(input, Token.DOWN, null);
match(input,TYPE,FOLLOW_TYPE_in_typeFieldDef865);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_typeFieldDef867);
vartype27=vartype();
state._fsp--;
match(input, Token.UP, null);
match(input,NAME,FOLLOW_NAME_in_typeFieldDef880);
match(input, Token.DOWN, null);
name=(CommonTree)match(input,ID,FOLLOW_ID_in_typeFieldDef884);
match(input, Token.UP, null);
match(input,FIELD_CONSTRUCTOR,FOLLOW_FIELD_CONSTRUCTOR_in_typeFieldDef897);
if ( input.LA(1)==Token.DOWN ) {
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:225:29: ( fieldConstructor )?
int alt10=2;
int LA10_0 = input.LA(1);
if ( ((LA10_0 >= ADDRESSABLE && LA10_0 <= 139)) ) {
alt10=1;
}
switch (alt10) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:225:30: fieldConstructor
{
pushFollow(FOLLOW_fieldConstructor_in_typeFieldDef900);
fieldConstructor26=fieldConstructor();
state._fsp--;
retval.constructor = (fieldConstructor26!=null?((TTree_TTreeShared.fieldConstructor_return)fieldConstructor26).constructor:null);
}
break;
}
match(input, Token.UP, null);
}
match(input, Token.UP, null);
boolean isURI = (vartype27!=null?((TTree.vartype_return)vartype27).mainType:null).endsWith("URI");
String scheme = ((vartype27!=null?((TTree.vartype_return)vartype27).mainType:null)).equals("RaptureURI") ? null : ((vartype27!=null?((TTree.vartype_return)vartype27).mainType:null)).substring(0, (vartype27!=null?((TTree.vartype_return)vartype27).mainType:null).length()-3).toUpperCase();
retval.fieldName = (name!=null?name.getText():null);
retval.beanInfo = templateLib.getInstanceOf("beanInfo",new STAttrMap().put("varName", (name!=null?name.getText():null)).put("varType", (isURI) ? "String" : (vartype27!=null?((TTree.vartype_return)vartype27).mainType:null)).put("constructor", retval.constructor).put("isURI", isURI).put("scheme", scheme));
retval.varType = (isURI) ? "String" : (vartype27!=null?((TTree.vartype_return)vartype27).mainType:null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "typeFieldDef"
public static class vartype_return extends TreeRuleReturnScope {
public String mainType;
public boolean isMappedType;
public String importType;
public String defValue;
public boolean equalsTest;
public String genericAlt;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "vartype"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:243:1: vartype returns [String mainType, boolean isMappedType, String importType, String defValue, boolean equalsTest, String genericAlt] : ( ^( RAW INTTYPE ) | ^( RAW LONGTYPE ) | ^( RAW BYTEARRAYTYPE ) | ^( RAW DATETYPE ) | ^( RAW OBJECTTYPE ) | ^( RAW LONGCTYPE ) | ^( RAW BOOLTYPE ) | ^( RAW DOUBLETYPE ) | ^( RAW STRINGTYPE ) | ^( RAW VOIDTYPE ) | ^( LISTTYPE v= vartype ) | ^( SETTYPE v= vartype ) | ^( MAPTYPE k= vartype v= vartype ) | ^( COMPLEX typeid= ID ) );
public final TTree.vartype_return vartype() throws RecognitionException {
TTree.vartype_return retval = new TTree.vartype_return();
retval.start = input.LT(1);
CommonTree typeid=null;
TreeRuleReturnScope v =null;
TreeRuleReturnScope k =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:243:131: ( ^( RAW INTTYPE ) | ^( RAW LONGTYPE ) | ^( RAW BYTEARRAYTYPE ) | ^( RAW DATETYPE ) | ^( RAW OBJECTTYPE ) | ^( RAW LONGCTYPE ) | ^( RAW BOOLTYPE ) | ^( RAW DOUBLETYPE ) | ^( RAW STRINGTYPE ) | ^( RAW VOIDTYPE ) | ^( LISTTYPE v= vartype ) | ^( SETTYPE v= vartype ) | ^( MAPTYPE k= vartype v= vartype ) | ^( COMPLEX typeid= ID ) )
int alt11=14;
switch ( input.LA(1) ) {
case RAW:
{
int LA11_1 = input.LA(2);
if ( (LA11_1==DOWN) ) {
switch ( input.LA(3) ) {
case INTTYPE:
{
alt11=1;
}
break;
case LONGTYPE:
{
alt11=2;
}
break;
case BYTEARRAYTYPE:
{
alt11=3;
}
break;
case DATETYPE:
{
alt11=4;
}
break;
case OBJECTTYPE:
{
alt11=5;
}
break;
case LONGCTYPE:
{
alt11=6;
}
break;
case BOOLTYPE:
{
alt11=7;
}
break;
case DOUBLETYPE:
{
alt11=8;
}
break;
case STRINGTYPE:
{
alt11=9;
}
break;
case VOIDTYPE:
{
alt11=10;
}
break;
default:
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 11, 6, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 11, 1, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
break;
case LISTTYPE:
{
alt11=11;
}
break;
case SETTYPE:
{
alt11=12;
}
break;
case MAPTYPE:
{
alt11=13;
}
break;
case COMPLEX:
{
alt11=14;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:244:5: ^( RAW INTTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype939);
match(input, Token.DOWN, null);
match(input,INTTYPE,FOLLOW_INTTYPE_in_vartype941);
match(input, Token.UP, null);
retval.mainType = "int"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "0"; retval.equalsTest =true;
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:245:7: ^( RAW LONGTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype953);
match(input, Token.DOWN, null);
match(input,LONGTYPE,FOLLOW_LONGTYPE_in_vartype955);
match(input, Token.UP, null);
retval.mainType = "long"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "0L"; retval.equalsTest =true;
}
break;
case 3 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:246:7: ^( RAW BYTEARRAYTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype967);
match(input, Token.DOWN, null);
match(input,BYTEARRAYTYPE,FOLLOW_BYTEARRAYTYPE_in_vartype969);
match(input, Token.UP, null);
retval.mainType = "byte[]"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "null"; retval.equalsTest =true;
}
break;
case 4 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:247:7: ^( RAW DATETYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype981);
match(input, Token.DOWN, null);
match(input,DATETYPE,FOLLOW_DATETYPE_in_vartype983);
match(input, Token.UP, null);
retval.mainType = "Date"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "null"; retval.equalsTest =true;
}
break;
case 5 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:248:7: ^( RAW OBJECTTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype995);
match(input, Token.DOWN, null);
match(input,OBJECTTYPE,FOLLOW_OBJECTTYPE_in_vartype997);
match(input, Token.UP, null);
retval.mainType = "Object"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "null";retval.equalsTest =true;
}
break;
case 6 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:249:7: ^( RAW LONGCTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype1009);
match(input, Token.DOWN, null);
match(input,LONGCTYPE,FOLLOW_LONGCTYPE_in_vartype1011);
match(input, Token.UP, null);
retval.mainType = "Long"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "0L";retval.equalsTest =true;
}
break;
case 7 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:250:7: ^( RAW BOOLTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype1023);
match(input, Token.DOWN, null);
match(input,BOOLTYPE,FOLLOW_BOOLTYPE_in_vartype1025);
match(input, Token.UP, null);
retval.mainType = "Boolean"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "true";retval.equalsTest =true;
}
break;
case 8 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:251:7: ^( RAW DOUBLETYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype1037);
match(input, Token.DOWN, null);
match(input,DOUBLETYPE,FOLLOW_DOUBLETYPE_in_vartype1039);
match(input, Token.UP, null);
retval.mainType = "Double"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "0.0";retval.equalsTest =false;
}
break;
case 9 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:252:7: ^( RAW STRINGTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype1051);
match(input, Token.DOWN, null);
match(input,STRINGTYPE,FOLLOW_STRINGTYPE_in_vartype1053);
match(input, Token.UP, null);
retval.mainType = "String"; retval.isMappedType = false; retval.importType = ""; retval.defValue = "\"job://test\"";retval.equalsTest =false;
}
break;
case 10 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:253:7: ^( RAW VOIDTYPE )
{
match(input,RAW,FOLLOW_RAW_in_vartype1065);
match(input, Token.DOWN, null);
match(input,VOIDTYPE,FOLLOW_VOIDTYPE_in_vartype1067);
match(input, Token.UP, null);
retval.mainType = "void"; retval.isMappedType = false; retval.importType = "";
}
break;
case 11 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:254:7: ^( LISTTYPE v= vartype )
{
match(input,LISTTYPE,FOLLOW_LISTTYPE_in_vartype1079);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_vartype1083);
v=vartype();
state._fsp--;
match(input, Token.UP, null);
retval.isMappedType = (v!=null?((TTree.vartype_return)v).isMappedType:false); retval.importType = (v!=null?((TTree.vartype_return)v).mainType:null); retval.defValue ="null"; retval.equalsTest =true;
retval.mainType = String.format("List<%s>", (v!=null?((TTree.vartype_return)v).genericAlt:null) == null ? (v!=null?((TTree.vartype_return)v).mainType:null) : (v!=null?((TTree.vartype_return)v).genericAlt:null));
}
break;
case 12 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:258:7: ^( SETTYPE v= vartype )
{
match(input,SETTYPE,FOLLOW_SETTYPE_in_vartype1095);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_vartype1099);
v=vartype();
state._fsp--;
match(input, Token.UP, null);
retval.isMappedType = (v!=null?((TTree.vartype_return)v).isMappedType:false); retval.importType = (v!=null?((TTree.vartype_return)v).mainType:null); retval.defValue ="null"; retval.equalsTest =true;
retval.mainType = String.format("Set<%s>", (v!=null?((TTree.vartype_return)v).genericAlt:null) == null ? (v!=null?((TTree.vartype_return)v).mainType:null) : (v!=null?((TTree.vartype_return)v).genericAlt:null));
}
break;
case 13 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:262:7: ^( MAPTYPE k= vartype v= vartype )
{
match(input,MAPTYPE,FOLLOW_MAPTYPE_in_vartype1111);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_vartype1115);
k=vartype();
state._fsp--;
pushFollow(FOLLOW_vartype_in_vartype1119);
v=vartype();
state._fsp--;
match(input, Token.UP, null);
retval.isMappedType = (v!=null?((TTree.vartype_return)v).isMappedType:false); retval.importType = (v!=null?((TTree.vartype_return)v).mainType:null); retval.defValue ="null";retval.equalsTest =true;
retval.mainType = String.format("Map<%s, %s>", (k!=null?((TTree.vartype_return)k).genericAlt:null) == null ? (k!=null?((TTree.vartype_return)k).mainType:null) : (k!=null?((TTree.vartype_return)k).genericAlt:null),
(v!=null?((TTree.vartype_return)v).genericAlt:null) == null ? (v!=null?((TTree.vartype_return)v).mainType:null) : (v!=null?((TTree.vartype_return)v).genericAlt:null));
}
break;
case 14 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:268:7: ^( COMPLEX typeid= ID )
{
match(input,COMPLEX,FOLLOW_COMPLEX_in_vartype1131);
match(input, Token.DOWN, null);
typeid=(CommonTree)match(input,ID,FOLLOW_ID_in_vartype1135);
match(input, Token.UP, null);
retval.mainType = (typeid!=null?typeid.getText():null);
retval.isMappedType = true;
retval.importType = retval.mainType;
retval.defValue = "null";
retval.equalsTest =true;
if (retval.mainType.endsWith("URI")) {
retval.genericAlt = "String";
}
else {
retval.genericAlt = retval.mainType;
}
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "vartype"
protected static class apiExpr_scope {
String apiName;
}
protected Stack apiExpr_stack = new Stack();
public static class apiExpr_return extends TreeRuleReturnScope {
public StringTemplate entList;
public StringTemplate kEntry;
public StringTemplate kSetup;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "apiExpr"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:283:1: apiExpr returns [StringTemplate entList, StringTemplate kEntry, StringTemplate kSetup] : ^( APISEC doc= DOC (deprecated= deprecatedAspect )? apiType= ID (a= apilist ) ) ;
public final TTree.apiExpr_return apiExpr() throws RecognitionException {
apiExpr_stack.push(new apiExpr_scope());
TTree.apiExpr_return retval = new TTree.apiExpr_return();
retval.start = input.LT(1);
CommonTree doc=null;
CommonTree apiType=null;
TreeRuleReturnScope deprecated =null;
TreeRuleReturnScope a =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:285:7: ( ^( APISEC doc= DOC (deprecated= deprecatedAspect )? apiType= ID (a= apilist ) ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:286:7: ^( APISEC doc= DOC (deprecated= deprecatedAspect )? apiType= ID (a= apilist ) )
{
match(input,APISEC,FOLLOW_APISEC_in_apiExpr1174);
match(input, Token.DOWN, null);
doc=(CommonTree)match(input,DOC,FOLLOW_DOC_in_apiExpr1178);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:286:34: (deprecated= deprecatedAspect )?
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==DEPRECATED) ) {
alt12=1;
}
switch (alt12) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:286:34: deprecated= deprecatedAspect
{
pushFollow(FOLLOW_deprecatedAspect_in_apiExpr1182);
deprecated=deprecatedAspect();
state._fsp--;
}
break;
}
apiType=(CommonTree)match(input,ID,FOLLOW_ID_in_apiExpr1187);
apiExpr_stack.peek().apiName = (apiType!=null?apiType.getText():null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:286:103: (a= apilist )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:286:104: a= apilist
{
pushFollow(FOLLOW_apilist_in_apiExpr1194);
a=apilist();
state._fsp--;
}
match(input, Token.UP, null);
// This is the definition of a set of apis in the same "class", so we
// need to emit at this level the DispatchFunction and the API definition
// Imports for all types referenced
String imp = getTypeImports((apiType!=null?apiType.getText():null));
// Construct the template for the API - not the passed apis etc are collected at the lower level
StringTemplate s = templateLib.getInstanceOf("apilist",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)).put("apis", (a!=null?((TTree.apilist_return)a).main:null)).put("typeimports", imp));
String apiFullPath = getGeneratedFilePath(sdkName, "common", "common", "api/" + "" + apiType + "Api.java");
addApiTemplate(apiFullPath, "1", s);
// Generate the wrapper classes
String wrapperImplPath = getGeneratedFilePath(sdkName, "kernel", "kernel", apiType + "ApiImplWrapper.java");
StringTemplate wrapperImpl = templateLib.getInstanceOf("wrapperImpl",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)).put("apis", (a!=null?((TTree.apilist_return)a).wrapperList:null)).put("typeimports", imp).put("payloadImports", (a!=null?((TTree.apilist_return)a).payloadImports:null)));
addKernelTemplate(wrapperImplPath, "1", wrapperImpl);
if (sdkName != null) {
StringTemplate baseImpl = templateLib.getInstanceOf("baseImpl",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)));
String baseImplPath = "build/generated-sources/main/java/rapture/" + sdkName + "/kernel/" + apiType + "ApiBase.java";
addKernelTemplate(baseImplPath, "1", baseImpl);
StringTemplate servletImpl = templateLib.getInstanceOf("servletImpl",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)));
String servletImplPath = "build/generated-sources/main/java/rapture/server/web/" + sdkName + "/servlet/" + apiType + "Servlet.java";
addKernelTemplate(servletImplPath, "1", servletImpl);
}
//script apis
String scriptApiFullPath = getGeneratedFilePath(sdkName, "common", "common", "api/Script" + apiType + "Api.java");
StringTemplate scriptS = templateLib.getInstanceOf("scriptapilist",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)).put("apis", (a!=null?((TTree.apilist_return)a).scriptMain:null)).put("typeimports", imp).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)));
addApiTemplate(scriptApiFullPath, "1", scriptS);
// As well as the above, we need to generate an implementation of the above interface
String scriptImplFullPath = getGeneratedFilePath(sdkName, "kernel", "kernel", "script/" + "Script" + apiType + ".java");
StringTemplate scriptImpl = templateLib.getInstanceOf("scriptapiimpl",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)).put("apis", (a!=null?((TTree.apilist_return)a).scriptImpl:null)).put("typeimports", imp).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)));
addKernelTemplate(scriptImplFullPath, "1", scriptImpl);
// DispatchXFunction template
String reqFullPath = getFileNameForType(sdkName, (apiType!=null?apiType.getText():null), "Dispatch" + (apiType!=null?apiType.getText():null), "Function");
String sdkPackagePrefix;
if (sdkName != null) {
sdkPackagePrefix = sdkName + ".";
}
else {
sdkPackagePrefix = "";
}
StringTemplate s2 = templateLib.getInstanceOf("dispatchFn",new STAttrMap().put("sdkPackagePrefix", sdkPackagePrefix).put("apitype", (apiType!=null?apiType.getText():null)).put("dispatcher", (a!=null?((TTree.apilist_return)a).disp:null)));
addKernelTemplate(reqFullPath, "1", s2);
// Api function template
String httpFullPath = getGeneratedFilePath(sdkName, "common", "common", "client/Http" + apiType + "Api.java");
// imp is not the right thing here, we should get it from the apilist
StringTemplate s3 = templateLib.getInstanceOf("httpfile",new STAttrMap().put("sdkname", sdkName).put("apitype", (apiType!=null?apiType.getText():null)).put("imports", imp).put("fns", (a!=null?((TTree.apilist_return)a).httpApi:null)).put("scriptFns", (a!=null?((TTree.apilist_return)a).httpScriptApi:null)).put("payloadImports", (a!=null?((TTree.apilist_return)a).payloadImports:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)));
addApiTemplate(httpFullPath, "1", s3);
addApiName((apiType!=null?apiType.getText():null));
retval.entList = templateLib.getInstanceOf("entTypes",new STAttrMap().put("entTypes", (a!=null?((TTree.apilist_return)a).entTypes:null)));
retval.entList = templateLib.getInstanceOf("entTypes",new STAttrMap().put("sdkname", sdkName).put("entTypes", (a!=null?((TTree.apilist_return)a).entTypes:null)));
if (sdkName != null) {
retval.kEntry = templateLib.getInstanceOf("kernelEntry",new STAttrMap().put("apitype", (apiType!=null?apiType.getText():null)));
retval.kSetup = templateLib.getInstanceOf("kernelEntrySetup",new STAttrMap().put("apitype", (apiType!=null?apiType.getText():null)));
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
apiExpr_stack.pop();
}
return retval;
}
// $ANTLR end "apiExpr"
public static class apilist_return extends TreeRuleReturnScope {
public List main;
public List scriptMain;
public List scriptImpl;
public List disp;
public List httpApi;
public List httpScriptApi;
public List payloadImports;
public List entTypes;
public List wrapperList;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "apilist"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:355:1: apilist returns [List main, List scriptMain, List scriptImpl, List disp, List httpApi, List httpScriptApi, List payloadImports, List entTypes, List wrapperList] : (a= apistmt )+ ;
public final TTree.apilist_return apilist() throws RecognitionException {
TTree.apilist_return retval = new TTree.apilist_return();
retval.start = input.LT(1);
TreeRuleReturnScope a =null;
retval.main = new ArrayList();
retval.wrapperList = new ArrayList();
retval.scriptMain = new ArrayList();
retval.disp = new ArrayList();
retval.httpApi = new ArrayList();
retval.httpScriptApi = new ArrayList();
retval.payloadImports = new ArrayList();
retval.entTypes = new ArrayList();
retval.scriptImpl = new ArrayList();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:367:3: ( (a= apistmt )+ )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:367:3: (a= apistmt )+
{
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:367:3: (a= apistmt )+
int cnt13=0;
loop13:
while (true) {
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==APIENTRY) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:367:4: a= apistmt
{
pushFollow(FOLLOW_apistmt_in_apilist1220);
a=apistmt();
state._fsp--;
retval.main.add((a!=null?((StringTemplate)a.getTemplate()):null));
retval.wrapperList.add((a!=null?((TTree.apistmt_return)a).wrapperStatement:null));
retval.scriptMain.add((a!=null?((TTree.apistmt_return)a).scriptEntry:null));
retval.disp.add((a!=null?((TTree.apistmt_return)a).dispatchEntry:null));
retval.httpApi.add((a!=null?((TTree.apistmt_return)a).httpEntry:null));
retval.httpScriptApi.add((a!=null?((TTree.apistmt_return)a).httpScriptEntry:null));
retval.payloadImports.add((a!=null?((TTree.apistmt_return)a).imp:null));
retval.entTypes.add((a!=null?((TTree.apistmt_return)a).entType:null));
retval.scriptImpl.add((a!=null?((TTree.apistmt_return)a).scriptImpl:null));
}
break;
default :
if ( cnt13 >= 1 ) break loop13;
EarlyExitException eee = new EarlyExitException(13, input);
throw eee;
}
cnt13++;
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "apilist"
public static class visibility_return extends TreeRuleReturnScope {
public int type;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "visibility"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:379:1: visibility returns [int type] : ( PRIVATEVIS | PUBLICVIS );
public final TTree.visibility_return visibility() throws RecognitionException {
TTree.visibility_return retval = new TTree.visibility_return();
retval.start = input.LT(1);
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:380:5: ( PRIVATEVIS | PUBLICVIS )
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==PRIVATEVIS) ) {
alt14=1;
}
else if ( (LA14_0==PUBLICVIS) ) {
alt14=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 14, 0, input);
throw nvae;
}
switch (alt14) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:380:7: PRIVATEVIS
{
match(input,PRIVATEVIS,FOLLOW_PRIVATEVIS_in_visibility1248);
retval.type = PRIVATEVIS;
}
break;
case 2 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:381:7: PUBLICVIS
{
match(input,PUBLICVIS,FOLLOW_PUBLICVIS_in_visibility1259);
retval.type = PUBLICVIS;
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "visibility"
public static class apistmt_return extends TreeRuleReturnScope {
public StringTemplate scriptEntry;
public StringTemplate dispatchEntry;
public StringTemplate httpEntry;
public StringTemplate httpScriptEntry;
public StringTemplate imp;
public StringTemplate entType;
public StringTemplate scriptImpl;
public StringTemplate wrapperStatement;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "apistmt"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:391:1: apistmt returns [StringTemplate scriptEntry, StringTemplate dispatchEntry, StringTemplate httpEntry, StringTemplate httpScriptEntry, StringTemplate imp, StringTemplate entType, StringTemplate scriptImpl, StringTemplate wrapperStatement] : ^( APIENTRY doc= DOC ^( ENTITLEASPECT (rent= REGULARENTITLE )+ (k= ID v= ID )* ) (deprecated= deprecatedAspect )? (streaming= STREAMING )? ^( VISIBILITY visibility ) ^( RETTYPE vartype ) ^( FNNAME name= ID ) p= paramList ) ;
public final TTree.apistmt_return apistmt() throws RecognitionException {
TTree.apistmt_return retval = new TTree.apistmt_return();
retval.start = input.LT(1);
CommonTree doc=null;
CommonTree rent=null;
CommonTree k=null;
CommonTree v=null;
CommonTree streaming=null;
CommonTree name=null;
TreeRuleReturnScope deprecated =null;
TreeRuleReturnScope p =null;
TreeRuleReturnScope visibility28 =null;
TreeRuleReturnScope vartype29 =null;
List regularEntitlements = new ArrayList();
Map dynamicEntMap = new HashMap();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:3: ( ^( APIENTRY doc= DOC ^( ENTITLEASPECT (rent= REGULARENTITLE )+ (k= ID v= ID )* ) (deprecated= deprecatedAspect )? (streaming= STREAMING )? ^( VISIBILITY visibility ) ^( RETTYPE vartype ) ^( FNNAME name= ID ) p= paramList ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:3: ^( APIENTRY doc= DOC ^( ENTITLEASPECT (rent= REGULARENTITLE )+ (k= ID v= ID )* ) (deprecated= deprecatedAspect )? (streaming= STREAMING )? ^( VISIBILITY visibility ) ^( RETTYPE vartype ) ^( FNNAME name= ID ) p= paramList )
{
match(input,APIENTRY,FOLLOW_APIENTRY_in_apistmt1289);
match(input, Token.DOWN, null);
doc=(CommonTree)match(input,DOC,FOLLOW_DOC_in_apistmt1293);
match(input,ENTITLEASPECT,FOLLOW_ENTITLEASPECT_in_apistmt1296);
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:38: (rent= REGULARENTITLE )+
int cnt15=0;
loop15:
while (true) {
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==REGULARENTITLE) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:39: rent= REGULARENTITLE
{
rent=(CommonTree)match(input,REGULARENTITLE,FOLLOW_REGULARENTITLE_in_apistmt1301);
regularEntitlements.add((rent!=null?rent.getText():null));
}
break;
default :
if ( cnt15 >= 1 ) break loop15;
EarlyExitException eee = new EarlyExitException(15, input);
throw eee;
}
cnt15++;
}
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:100: (k= ID v= ID )*
loop16:
while (true) {
int alt16=2;
int LA16_0 = input.LA(1);
if ( (LA16_0==ID) ) {
alt16=1;
}
switch (alt16) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:101: k= ID v= ID
{
k=(CommonTree)match(input,ID,FOLLOW_ID_in_apistmt1310);
v=(CommonTree)match(input,ID,FOLLOW_ID_in_apistmt1314);
dynamicEntMap.put((k!=null?k.getText():null), (v!=null?v.getText():null));
}
break;
default :
break loop16;
}
}
match(input, Token.UP, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:163: (deprecated= deprecatedAspect )?
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==DEPRECATED) ) {
alt17=1;
}
switch (alt17) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:163: deprecated= deprecatedAspect
{
pushFollow(FOLLOW_deprecatedAspect_in_apistmt1323);
deprecated=deprecatedAspect();
state._fsp--;
}
break;
}
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:191: (streaming= STREAMING )?
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==STREAMING) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:396:191: streaming= STREAMING
{
streaming=(CommonTree)match(input,STREAMING,FOLLOW_STREAMING_in_apistmt1328);
}
break;
}
match(input,VISIBILITY,FOLLOW_VISIBILITY_in_apistmt1332);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_visibility_in_apistmt1334);
visibility28=visibility();
state._fsp--;
match(input, Token.UP, null);
match(input,RETTYPE,FOLLOW_RETTYPE_in_apistmt1338);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_apistmt1340);
vartype29=vartype();
state._fsp--;
match(input, Token.UP, null);
match(input,FNNAME,FOLLOW_FNNAME_in_apistmt1344);
match(input, Token.DOWN, null);
name=(CommonTree)match(input,ID,FOLLOW_ID_in_apistmt1348);
match(input, Token.UP, null);
pushFollow(FOLLOW_paramList_in_apistmt1353);
p=paramList();
state._fsp--;
match(input, Token.UP, null);
// An apistmt needs to generate in two files - the api file (which is done at a higher level) and in
// a whole new set of files which are dependent on the fnName
// System.out.println("PVT is : " + (visibility28!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(visibility28.start),input.getTreeAdaptor().getTokenStopIndex(visibility28.start))):null));
// Visibility can be either @public or @private
// If it is @private, we don't generate much at all, particularly the Payload
// And HttpEntry files
boolean isPrivate = false;
if (PRIVATEVIS == (visibility28!=null?((TTree.visibility_return)visibility28).type:0)) {
isPrivate = true;
}
// store the reflection methods for the payload files
List dynEntEntries = new ArrayList();
for (Map.Entry entry : dynamicEntMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
if (key.equals("f")) {
dynEntEntries.add(templateLib.getInstanceOf("dynamicentitlemententry",new STAttrMap().put("dynEntType", "fullPath").put("uriArg", value)));
}
else if (key.equals("d")) {
dynEntEntries.add(templateLib.getInstanceOf("dynamicentitlemententry",new STAttrMap().put("dynEntType", "docPath").put("uriArg", value)));
}
else if (key.equals("a")) {
dynEntEntries.add(templateLib.getInstanceOf("dynamicentitlemententry",new STAttrMap().put("dynEntType", "authority").put("uriArg", value)));
}
}
String ent = reassembleFullEntitlmentPath(regularEntitlements, dynamicEntMap);
boolean isStreaming = false;
if(streaming != null ) {
isStreaming = true;
}
boolean isVoid = (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null).equals("void");
String entName = generateEntName(apiExpr_stack.peek().apiName, ent);
retval.entType = templateLib.getInstanceOf("entEntry",new STAttrMap().put("api", apiExpr_stack.peek().apiName).put("name", (name!=null?name.getText():null)).put("path", entName));
addCallNameEntry(templateLib.getInstanceOf("callNameEntry",new STAttrMap().put("api", apiExpr_stack.peek().apiName).put("name", (name!=null?name.getText():null))));
// This is the one that is passed above (we could add it to the "api.java" here, but there's no real need
String d = doc.getText();
d = d.substring(1,d.length()-1);
if (d.length() > 0){
d = formatDoc(d);
}
retval.st = templateLib.getInstanceOf("apiEntry",new STAttrMap().put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", name).put("params", (p!=null?((TTree.paramList_return)p).main:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)).put("doc", d));
retval.wrapperStatement = templateLib.getInstanceOf("wrapperEntry",new STAttrMap().put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("params", (p!=null?((TTree.paramList_return)p).main:null)).put("callParams", (p!=null?((TTree.paramList_return)p).paramListAspect:null)).put("apitype", apiExpr_stack.peek().apiName).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)).put("isVoid", isVoid));
retval.scriptEntry = templateLib.getInstanceOf("apiEntry",new STAttrMap().put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", name).put("params", (p!=null?((TTree.paramList_return)p).scriptMain:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)));
retval.scriptImpl = templateLib.getInstanceOf("scriptapientry",new STAttrMap().put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", name).put("params", (p!=null?((TTree.paramList_return)p).scriptMain:null)).put("apiparams", (p!=null?((TTree.paramList_return)p).paramListAlt:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)).put("apitype", apiExpr_stack.peek().apiName).put("isVoid", isVoid));
// And this is the one that is used to create new files
String retImport = "";
if ((vartype29!=null?((TTree.vartype_return)vartype29).isMappedType:false)) {
retImport = "import " + getPackageAndClass((vartype29!=null?((TTree.vartype_return)vartype29).importType:null)) + ";";
addImportForApi(apiExpr_stack.peek().apiName, (vartype29!=null?((TTree.vartype_return)vartype29).importType:null));
}
if (!isPrivate && !isStreaming) {
retval.dispatchEntry = templateLib.getInstanceOf("dispatchEntry",new STAttrMap().put("name", (name!=null?name.getText():null)));
retval.imp = templateLib.getInstanceOf("reqRespImp",new STAttrMap().put("sdkname", sdkName).put("apitype", apiExpr_stack.peek().apiName).put("name", (name!=null?name.getText():null)));
retval.httpScriptEntry = templateLib.getInstanceOf("httpscriptapifn",new STAttrMap().put("apitype", apiExpr_stack.peek().apiName).put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("params", (p!=null?((TTree.paramList_return)p).scriptMain:null)).put("callParams", (p!=null?((TTree.paramList_return)p).paramListAlt:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)).put("isVoid", isVoid));
retval.httpEntry = templateLib.getInstanceOf("httpapifn",new STAttrMap().put("apitype", apiExpr_stack.peek().apiName).put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("params", (p!=null?((TTree.paramList_return)p).main:null)).put("apiparams", (p!=null?((TTree.paramList_return)p).paramList:null)).put("deprecated", (deprecated!=null?((TTree.deprecatedAspect_return)deprecated).reason:null)).put("isVoid", isVoid));
StringTemplate s = templateLib.getInstanceOf("dispatchFile",new STAttrMap().put("sdkname", sdkName).put("apitype", apiExpr_stack.peek().apiName).put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("params", (p!=null?((TTree.paramList_return)p).alternate:null)).put("apiparams", (p!=null?((TTree.paramList_return)p).paramList:null)).put("imports", (p!=null?((TTree.paramList_return)p).packageList:null)).put("retImport", retImport).put("ent", ent).put("isVoid", isVoid));
String reqFullPath = getFileNameForType(sdkName, apiExpr_stack.peek().apiName, (name!=null?name.getText():null), "Dispatch");
addKernelTemplate(reqFullPath, "1", s);
// Also create a payload file
StringTemplate s2 = templateLib.getInstanceOf("payloadFile",new STAttrMap().put("sdkname", sdkName).put("apitype", apiExpr_stack.peek().apiName).put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("params", (p!=null?((TTree.paramList_return)p).alternate:null)).put("apiparams", (p!=null?((TTree.paramList_return)p).paramList:null)).put("imports", (p!=null?((TTree.paramList_return)p).packageList:null)).put("retImport", retImport).put("dynEnt", dynEntEntries));
String reqFullPath2 = getFileNameForType(sdkName, apiExpr_stack.peek().apiName, (name!=null?name.getText():null), "Payload");
addApiTemplate(reqFullPath2, "1", s2);
// And create a test for the payload file
StringTemplate s3 = templateLib.getInstanceOf("payloadTestFile",new STAttrMap().put("sdkname", sdkName).put("apitype", apiExpr_stack.peek().apiName).put("ret", (vartype29!=null?((TTree.vartype_return)vartype29).mainType:null)).put("name", (name!=null?name.getText():null)).put("testSetters", (p!=null?((TTree.paramList_return)p).testSetters:null)).put("testGetters", (p!=null?((TTree.paramList_return)p).testGetters:null)));
String reqFullPath3 = getTestFileNameForType(sdkName, apiExpr_stack.peek().apiName, (name!=null?name.getText():null), "Payload");
addApiTemplate(reqFullPath3, "1", s3);
//System.out.println("File name is " + reqFullPath3);
addImportForApi(apiExpr_stack.peek().apiName, (p!=null?((TTree.paramList_return)p).typeNames:null));
} else if(!isPrivate && isStreaming ) {
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "apistmt"
public static class paramList_return extends TreeRuleReturnScope {
public Set typeNames;
public List main;
public List scriptMain;
public List alternate;
public List paramList;
public List paramListAlt;
public List paramListAspect;
public List packageList;
public List testSetters;
public List testGetters;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "paramList"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:489:1: paramList returns [Set typeNames, List main, List scriptMain, List alternate, List paramList, List paramListAlt, List paramListAspect, \n List packageList, List testSetters, List testGetters] : ^( PARAMS (a= param )* ) ;
public final TTree.paramList_return paramList() throws RecognitionException {
TTree.paramList_return retval = new TTree.paramList_return();
retval.start = input.LT(1);
TreeRuleReturnScope a =null;
retval.typeNames = new HashSet();
retval.alternate = new ArrayList();
retval.main = new ArrayList();
retval.scriptMain = new ArrayList();
retval.main.add(new StringTemplate("CallingContext context"));
retval.paramList = new ArrayList();
retval.paramList.add(new StringTemplate("payload.getContext()"));
retval.paramListAlt = new ArrayList();
retval.paramListAspect = new ArrayList();
retval.paramListAspect.add(new StringTemplate("context"));
retval.packageList = new ArrayList();
retval.testSetters = new ArrayList();
retval.testGetters = new ArrayList();
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:506:2: ( ^( PARAMS (a= param )* ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:507:2: ^( PARAMS (a= param )* )
{
match(input,PARAMS,FOLLOW_PARAMS_in_paramList1375);
if ( input.LA(1)==Token.DOWN ) {
match(input, Token.DOWN, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:507:11: (a= param )*
loop19:
while (true) {
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==PARAM) ) {
alt19=1;
}
switch (alt19) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:507:12: a= param
{
pushFollow(FOLLOW_param_in_paramList1380);
a=param();
state._fsp--;
retval.alternate.add((a!=null?((TTree.param_return)a).alternate:null));
retval.main.add((a!=null?((StringTemplate)a.getTemplate()):null));
retval.scriptMain.add((a!=null?((StringTemplate)a.getTemplate()):null));
retval.paramList.add((a!=null?((TTree.param_return)a).param:null).toString());
retval.paramListAlt.add((a!=null?((TTree.param_return)a).param:null).toString());
retval.paramListAspect.add((a!=null?((TTree.param_return)a).param:null).toString());
retval.packageList.add((a!=null?((TTree.param_return)a).pack:null));
retval.testSetters.add((a!=null?((TTree.param_return)a).testSetter:null));
retval.testGetters.add((a!=null?((TTree.param_return)a).testGetter:null));
retval.typeNames.add((a!=null?((TTree.param_return)a).typeName:null).toString());
}
break;
default :
break loop19;
}
}
match(input, Token.UP, null);
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "paramList"
public static class param_return extends TreeRuleReturnScope {
public StringTemplate alternate;
public StringTemplate param;
public StringTemplate pack;
public StringTemplate testSetter;
public StringTemplate testGetter;
public String typeName;
public StringTemplate st;
public Object getTemplate() { return st; }
public String toString() { return st==null?null:st.toString(); }
};
// $ANTLR start "param"
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:520:1: param returns [StringTemplate alternate, StringTemplate param, StringTemplate pack, StringTemplate testSetter, StringTemplate testGetter, String typeName] : ^( PARAM ^( TYPE t= vartype ) ^( NAME n= ID ) ( BANG )? ) ;
public final TTree.param_return param() throws RecognitionException {
TTree.param_return retval = new TTree.param_return();
retval.start = input.LT(1);
CommonTree n=null;
TreeRuleReturnScope t =null;
try {
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:520:154: ( ^( PARAM ^( TYPE t= vartype ) ^( NAME n= ID ) ( BANG )? ) )
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:520:157: ^( PARAM ^( TYPE t= vartype ) ^( NAME n= ID ) ( BANG )? )
{
match(input,PARAM,FOLLOW_PARAM_in_param1417);
match(input, Token.DOWN, null);
match(input,TYPE,FOLLOW_TYPE_in_param1420);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_vartype_in_param1424);
t=vartype();
state._fsp--;
match(input, Token.UP, null);
match(input,NAME,FOLLOW_NAME_in_param1428);
match(input, Token.DOWN, null);
n=(CommonTree)match(input,ID,FOLLOW_ID_in_param1432);
match(input, Token.UP, null);
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:520:196: ( BANG )?
int alt20=2;
int LA20_0 = input.LA(1);
if ( (LA20_0==BANG) ) {
alt20=1;
}
switch (alt20) {
case 1 :
// /Users/amkimian/Development/cloud/Rapture/Libs/CodeGen/CodeGenLib/src/main/antlr3/com/incapture/rapgen/TTree.g:520:196: BANG
{
match(input,BANG,FOLLOW_BANG_in_param1435);
}
break;
}
match(input, Token.UP, null);
retval.st = templateLib.getInstanceOf("param",new STAttrMap().put("type", (t!=null?((TTree.vartype_return)t).mainType:null)).put("name", (n!=null?n.getText():null)));
boolean isURI = (t!=null?((TTree.vartype_return)t).mainType:null).endsWith("URI");
String scheme = ((t!=null?((TTree.vartype_return)t).mainType:null)).equals("RaptureURI") ? null : ((t!=null?((TTree.vartype_return)t).mainType:null)).substring(0, (t!=null?((TTree.vartype_return)t).mainType:null).length()-3).toUpperCase();
retval.alternate = templateLib.getInstanceOf("attrForClass",new STAttrMap().put("name", (n!=null?n.getText():null)).put("type", (isURI) ? "String" : (t!=null?((TTree.vartype_return)t).mainType:null)).put("isURI", isURI).put("scheme", scheme));
retval.param = templateLib.getInstanceOf("param2",new STAttrMap().put("name", (n!=null?n.getText():null)));
if ((t!=null?((TTree.vartype_return)t).isMappedType:false) && !isURI) {
retval.pack = templateLib.getInstanceOf("package",new STAttrMap().put("name", getPackageAndClass((t!=null?((TTree.vartype_return)t).importType:null)) ));
retval.typeName = (t!=null?((TTree.vartype_return)t).importType:null);
} else {
retval.pack = new StringTemplate();
retval.typeName = "";
}
retval.testSetter = templateLib.getInstanceOf("callSetter",new STAttrMap().put("name", (n!=null?n.getText():null)).put("value", (t!=null?((TTree.vartype_return)t).defValue:null)));
retval.testGetter = templateLib.getInstanceOf("testGetter",new STAttrMap().put("name", (n!=null?n.getText():null)).put("value", (t!=null?((TTree.vartype_return)t).defValue:null)).put("equalsTest", (t!=null?((TTree.vartype_return)t).equalsTest:false)));
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "param"
// Delegated rules
public TTree_TTreeShared.minVerExpr_return minVerExpr() throws RecognitionException { return gTTreeShared.minVerExpr(); }
public TTree_TTreeShared.deprecatedAnnotation_return deprecatedAnnotation() throws RecognitionException { return gTTreeShared.deprecatedAnnotation(); }
public TTree_TTreeShared.addressableAnnotation_return addressableAnnotation() throws RecognitionException { return gTTreeShared.addressableAnnotation(); }
public TTree_TTreeShared.cacheableAnnotation_return cacheableAnnotation() throws RecognitionException { return gTTreeShared.cacheableAnnotation(); }
public TTree_TTreeShared.storableAnnotation_return storableAnnotation() throws RecognitionException { return gTTreeShared.storableAnnotation(); }
public TTree_TTreeShared.indexedAnnotation_return indexedAnnotation() throws RecognitionException { return gTTreeShared.indexedAnnotation(); }
public TTree_TTreeShared.extendsAnnotation_return extendsAnnotation() throws RecognitionException { return gTTreeShared.extendsAnnotation(); }
public TTree_TTreeShared.beanAnnotation_return beanAnnotation() throws RecognitionException { return gTTreeShared.beanAnnotation(); }
public TTree_TTreeShared.versionExpr_return versionExpr() throws RecognitionException { return gTTreeShared.versionExpr(); }
public TTree_TTreeShared.fieldConstructor_return fieldConstructor() throws RecognitionException { return gTTreeShared.fieldConstructor(); }
public static final BitSet FOLLOW_INNERT_in_innerExpr98 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_typeExpr_in_innerExpr100 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_INNERC_in_innerExpr118 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_crudTypeExpr_in_innerExpr120 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_INNERA_in_innerExpr141 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_apiExpr_in_innerExpr145 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_hmxdef_in_sdkGen171 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_hmxdef_in_apiGen193 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MAIN_in_hmxdef225 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_sdkExpr_in_hmxdef228 = new BitSet(new long[]{0x0000000000000000L,0x0000400000000000L});
public static final BitSet FOLLOW_versionExpr_in_hmxdef252 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
public static final BitSet FOLLOW_minVerExpr_in_hmxdef254 = new BitSet(new long[]{0x0000000000000008L,0x00000000000E0000L});
public static final BitSet FOLLOW_innerExpr_in_hmxdef256 = new BitSet(new long[]{0x0000000000000008L,0x00000000000E0000L});
public static final BitSet FOLLOW_SDKDEF_in_sdkExpr281 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_sdkExpr283 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_CRUDTYPEDEF_in_crudTypeExpr303 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DOC_in_crudTypeExpr307 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_addressableAnnotation_in_crudTypeExpr331 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_storableAnnotation_in_crudTypeExpr347 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_extendsAnnotation_in_crudTypeExpr363 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_deprecatedAnnotation_in_crudTypeExpr379 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_beanAnnotation_in_crudTypeExpr395 = new BitSet(new long[]{0x0200000024080110L,0x0000000000000100L});
public static final BitSet FOLLOW_crudPackageAnnotation_in_crudTypeExpr418 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_ID_in_crudTypeExpr423 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
public static final BitSet FOLLOW_crudTypeInfo_in_crudTypeExpr427 = new BitSet(new long[]{0x0000000000000000L,0x0000100000000000L});
public static final BitSet FOLLOW_typeFields_in_crudTypeExpr429 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_CRUDINFO_in_crudTypeInfo458 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_crudDirective_in_crudTypeInfo461 = new BitSet(new long[]{0x0000000000000008L,0x0000000000000080L});
public static final BitSet FOLLOW_CRUDINFOENTRY_in_crudDirective479 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_crudDirective483 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_TYPEDEF_in_typeExpr520 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DOC_in_typeExpr524 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_addressableAnnotation_in_typeExpr549 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_storableAnnotation_in_typeExpr565 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_extendsAnnotation_in_typeExpr581 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_deprecatedAnnotation_in_typeExpr597 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_indexedAnnotation_in_typeExpr613 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_beanAnnotation_in_typeExpr629 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_cacheableAnnotation_in_typeExpr645 = new BitSet(new long[]{0x02000000A4080910L});
public static final BitSet FOLLOW_ID_in_typeExpr670 = new BitSet(new long[]{0x0000000000000000L,0x0000040000000000L});
public static final BitSet FOLLOW_typeAspect_in_typeExpr672 = new BitSet(new long[]{0x0000000000000000L,0x0000100000000000L});
public static final BitSet FOLLOW_typeFields_in_typeExpr674 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_TYPEASPECT_in_typeAspect694 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_PACKAGENAME_in_typeAspect698 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_CRUDPACKAGEANNOTATION_in_crudPackageAnnotation717 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_PACKAGENAME_in_crudPackageAnnotation721 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_DEPRECATED_in_deprecatedAspect743 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_ID_in_deprecatedAspect745 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_DEPRECATED_in_deprecatedAspect760 = new BitSet(new long[]{0x1000000000000000L});
public static final BitSet FOLLOW_STRING_in_deprecatedAspect762 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_TYPEFIELDS_in_typeFields804 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_typeFieldDef_in_typeFields816 = new BitSet(new long[]{0x0000000000000008L,0x0000200000000000L});
public static final BitSet FOLLOW_TYPEMEMBER_in_typeFieldDef853 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_TYPE_in_typeFieldDef865 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_typeFieldDef867 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_NAME_in_typeFieldDef880 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_typeFieldDef884 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_FIELD_CONSTRUCTOR_in_typeFieldDef897 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_fieldConstructor_in_typeFieldDef900 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype939 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_INTTYPE_in_vartype941 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype953 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_LONGTYPE_in_vartype955 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype967 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_BYTEARRAYTYPE_in_vartype969 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype981 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DATETYPE_in_vartype983 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype995 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_OBJECTTYPE_in_vartype997 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype1009 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_LONGCTYPE_in_vartype1011 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype1023 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_BOOLTYPE_in_vartype1025 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype1037 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DOUBLETYPE_in_vartype1039 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype1051 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_STRINGTYPE_in_vartype1053 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RAW_in_vartype1065 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_VOIDTYPE_in_vartype1067 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_LISTTYPE_in_vartype1079 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_vartype1083 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_SETTYPE_in_vartype1095 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_vartype1099 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_MAPTYPE_in_vartype1111 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_vartype1115 = new BitSet(new long[]{0x0080010800000000L,0x0000000020000020L});
public static final BitSet FOLLOW_vartype_in_vartype1119 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_COMPLEX_in_vartype1131 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_vartype1135 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_APISEC_in_apiExpr1174 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DOC_in_apiExpr1178 = new BitSet(new long[]{0x0000000020080000L});
public static final BitSet FOLLOW_deprecatedAspect_in_apiExpr1182 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_ID_in_apiExpr1187 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
public static final BitSet FOLLOW_apilist_in_apiExpr1194 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_apistmt_in_apilist1220 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L});
public static final BitSet FOLLOW_PRIVATEVIS_in_visibility1248 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_PUBLICVIS_in_visibility1259 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_APIENTRY_in_apistmt1289 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_DOC_in_apistmt1293 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
public static final BitSet FOLLOW_ENTITLEASPECT_in_apistmt1296 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_REGULARENTITLE_in_apistmt1301 = new BitSet(new long[]{0x0004000020000008L});
public static final BitSet FOLLOW_ID_in_apistmt1310 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_ID_in_apistmt1314 = new BitSet(new long[]{0x0000000020000008L});
public static final BitSet FOLLOW_deprecatedAspect_in_apistmt1323 = new BitSet(new long[]{0x0800000000000000L,0x0000800000000000L});
public static final BitSet FOLLOW_STREAMING_in_apistmt1328 = new BitSet(new long[]{0x0000000000000000L,0x0000800000000000L});
public static final BitSet FOLLOW_VISIBILITY_in_apistmt1332 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_visibility_in_apistmt1334 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RETTYPE_in_apistmt1338 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_apistmt1340 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_FNNAME_in_apistmt1344 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_apistmt1348 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_paramList_in_apistmt1353 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_PARAMS_in_paramList1375 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_param_in_paramList1380 = new BitSet(new long[]{0x0000000000000008L,0x0000000002000000L});
public static final BitSet FOLLOW_PARAM_in_param1417 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_TYPE_in_param1420 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_vartype_in_param1424 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_NAME_in_param1428 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_param1432 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_BANG_in_param1435 = new BitSet(new long[]{0x0000000000000008L});
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy