2 |
2 |
** Module : Variable.java
|
3 |
3 |
** Abstract : contains the data needed to define a Progress variable
|
4 |
4 |
**
|
5 |
|
** Copyright (c) 2005-2020, Golden Code Development Corporation.
|
|
5 |
** Copyright (c) 2005-2021, Golden Code Development Corporation.
|
6 |
6 |
**
|
7 |
7 |
** -#- -I- --Date-- --JPRM-- ----------------Description-----------------
|
8 |
8 |
** 001 GES 20050210 @19752 First version, simple bean-like approach.
|
... | ... | |
79 |
79 |
** 215 CA 20200412 Added incremental conversion support.
|
80 |
80 |
** 216 CA 20200429 Legacy DEFINE ENUM conversion support.
|
81 |
81 |
** 217 CA 20200804 Added getExtent().
|
|
82 |
** 218 CA 20210318 Fixed conversion of extent() function/statement with builtin OO properties.
|
82 |
83 |
*/
|
83 |
84 |
|
84 |
85 |
/*
|
... | ... | |
816 |
817 |
{
|
817 |
818 |
ast.putAnnotation("cls-property", new Boolean(true));
|
818 |
819 |
ast.putAnnotation("cls-container", clsDef.getFilename());
|
819 |
|
|
820 |
|
if (clsDef != null &&
|
821 |
|
original &&
|
822 |
|
(!SymbolResolver.isPreScan() || (clsDef.isBuiltIn() && !clsDef.isDotNet())))
|
823 |
|
{
|
824 |
|
String[] mnames =
|
825 |
|
{
|
826 |
|
"get",
|
827 |
|
"set",
|
828 |
|
"resize",
|
829 |
|
"length-of"
|
830 |
|
};
|
831 |
|
Aast ptype = def.getImmediateChild(KW_AS, null);
|
832 |
|
ptype = (Aast) ptype.getFirstChild();
|
833 |
|
String propType = ExpressionConversionWorker.expressionType(ptype, false);
|
834 |
|
ParameterKey[][] pks =
|
835 |
|
{
|
836 |
|
null,
|
837 |
|
new ParameterKey[] { new ParameterKey(KW_INPUT, propType) },
|
838 |
|
new ParameterKey[] { new ParameterKey(KW_INPUT, "int64") },
|
839 |
|
null,
|
840 |
|
};
|
841 |
|
for (int i = 0; i < mnames.length; i++)
|
842 |
|
{
|
843 |
|
if (!isExtent() && i > 1)
|
844 |
|
{
|
845 |
|
break;
|
846 |
|
}
|
847 |
|
String mname = mnames[i] + "-" + name;
|
848 |
|
String javaname = null;
|
849 |
|
String legacySignature = SymbolResolver.calculateLegacySignature(mname, pks[i]);
|
850 |
|
if (clsDef.isBuiltIn())
|
851 |
|
{
|
852 |
|
javaname = clsDef.getConvertedMethodName(legacySignature);
|
853 |
|
}
|
854 |
|
SymbolResolver.trackMethodSignature(javaname, mname, pks[i]);
|
855 |
|
|
856 |
|
String javaSignature = SymbolResolver.calculateJavaSignature(mname, pks[i]);
|
857 |
|
def.putAnnotation(mnames[i] + "-legacysignature", legacySignature);
|
858 |
|
def.putAnnotation(mnames[i] + "-javasignature", javaSignature);
|
859 |
|
}
|
860 |
|
}
|
861 |
820 |
}
|
862 |
821 |
|
863 |
822 |
if (original &&
|
... | ... | |
1234 |
1193 |
}
|
1235 |
1194 |
}
|
1236 |
1195 |
|
|
1196 |
if (isProp && clsDef != null && original &&
|
|
1197 |
(!SymbolResolver.isPreScan() || (clsDef.isBuiltIn() && !clsDef.isDotNet())))
|
|
1198 |
{
|
|
1199 |
String[] mnames =
|
|
1200 |
{
|
|
1201 |
"get",
|
|
1202 |
"set",
|
|
1203 |
"resize",
|
|
1204 |
"length-of"
|
|
1205 |
};
|
|
1206 |
Aast ptype = def.getImmediateChild(KW_AS, null);
|
|
1207 |
ptype = (Aast) ptype.getFirstChild();
|
|
1208 |
String propType = ExpressionConversionWorker.expressionType(ptype, false);
|
|
1209 |
ParameterKey[][] pks =
|
|
1210 |
{
|
|
1211 |
null,
|
|
1212 |
new ParameterKey[] { new ParameterKey(KW_INPUT, propType) },
|
|
1213 |
new ParameterKey[] { new ParameterKey(KW_INPUT, "int64") },
|
|
1214 |
null,
|
|
1215 |
};
|
|
1216 |
for (int i = 0; i < mnames.length; i++)
|
|
1217 |
{
|
|
1218 |
if (!isExtent() && i > 1)
|
|
1219 |
{
|
|
1220 |
break;
|
|
1221 |
}
|
|
1222 |
String mname = mnames[i] + "-" + name;
|
|
1223 |
String javaname = null;
|
|
1224 |
String legacySignature = SymbolResolver.calculateLegacySignature(mname, pks[i]);
|
|
1225 |
if (clsDef.isBuiltIn())
|
|
1226 |
{
|
|
1227 |
javaname = clsDef.getConvertedMethodName(legacySignature);
|
|
1228 |
}
|
|
1229 |
SymbolResolver.trackMethodSignature(javaname, mname, pks[i]);
|
|
1230 |
|
|
1231 |
String javaSignature = SymbolResolver.calculateJavaSignature(mname, pks[i]);
|
|
1232 |
def.putAnnotation(mnames[i] + "-legacysignature", legacySignature);
|
|
1233 |
def.putAnnotation(mnames[i] + "-javasignature", javaSignature);
|
|
1234 |
}
|
|
1235 |
}
|
1237 |
1236 |
}
|
1238 |
1237 |
|
1239 |
1238 |
/**
|