Class CallProcedure
java.lang.Object
simula.compiler.syntaxClass.expression.CallProcedure
Java Coding Utilities: Call Procedure
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringasNormalMethod(VariableExpression variable) Java Coding: Edit Call Procedure as normal Method.private static StringasRemoteMethod(Expression obj, ProcedureDeclaration procedure, VariableExpression func) Java Coding: Edit Call Procedure as remote Method.(package private) static StringasStaticMethod(VariableExpression variable, boolean isContextFree) Java Coding: Edit Call Procedure as static Method.private static StringcodeCPF(String ident, VariableExpression variable, ProcedureSpecification procedureSpec) Java Coding Utility: Edit Call Procedure Formal.private static StringcodeCSVP(String ident, VariableExpression variable, ProcedureSpecification procedureSpec) Java Coding Utility: Edit Call Specified Virtual Procedure.private static voiddoArrayParameter(StringBuilder s, Type formalType, int mode, Expression apar) Java Coding Utility: Edit Array as Actual Parameter into the given StringBuilder.private static StringdoParameterTransmition(Type formalType, int kind, int mode, Expression apar) Java Coding Utility: Edit parameter transmission,private static voiddoProcedureParameter(StringBuilder s, Type formalType, int mode, Expression apar) Java Coding Utility: Edit Procedure as Actual Parameter into the given StringBuilder.private static voiddoSimpleParameter(StringBuilder s, Type formalType, int mode, Expression apar) Java Coding Utility: Edit simple parameter into the given StringBuilder.private static StringedProcedureParameters(VariableExpression variable, String SL, ProcedureDeclaration procedure) Java Coding Utility: Edit procedure parameters.private static StringedProcedureQuant(Expression apar) Java Coding Utility: Edit new procedure quant.(package private) static Stringformal(VariableExpression variable, Parameter par) Java Coding: Edit Call Procedure Formal.private static intgetNdim(Expression actualParameter) Returns the array's number of dimensions.(package private) static Stringnormal(VariableExpression variable) Java Coding: Edit Call Procedure Normal.(package private) static Stringremote(Expression obj, ProcedureDeclaration procedure, VariableExpression func, SyntaxClass backLink) Java Coding: Edit Call Procedure Remote.(package private) static StringremoteVirtual(Expression obj, VariableExpression variable, VirtualSpecification virtual) Java Coding: Edit Call Procedure Remote Virtual.(package private) static Stringvirtual(VariableExpression variable, VirtualSpecification virtual, boolean remotelyAccessed) Java Coding: Edit Call Procedure Virtual.
-
Constructor Details
-
CallProcedure
CallProcedure()Default constructor.
-
-
Method Details
-
normal
Java Coding: Edit Call Procedure Normal.- Parameters:
variable- the procedure variable- Returns:
- piece of Java source code
-
remote
static String remote(Expression obj, ProcedureDeclaration procedure, VariableExpression func, SyntaxClass backLink) Java Coding: Edit Call Procedure Remote.- Parameters:
obj- Object Expression before DOTprocedure- Procedure Declarationfunc- Function Designator, may be subscriptedbackLink- if not null, this procedure call is part of the backLink Expression/Statement.- Returns:
- piece of Java source code
-
asRemoteMethod
private static String asRemoteMethod(Expression obj, ProcedureDeclaration procedure, VariableExpression func) Java Coding: Edit Call Procedure as remote Method.- Parameters:
obj- Object Expression before DOTprocedure- Procedure Declarationfunc- Function Designator, may be subscripted- Returns:
- piece of Java source code
-
asNormalMethod
Java Coding: Edit Call Procedure as normal Method.- Parameters:
variable- the procedure variable- Returns:
- piece of Java source code
-
asStaticMethod
Java Coding: Edit Call Procedure as static Method.- Parameters:
variable- the procedure variableisContextFree- true if the procedure is independent of context- Returns:
- piece of Java source code
-
formal
Java Coding: Edit Call Procedure Formal.- Parameters:
variable- the procedure variablepar- declared as parameter 'par'- Returns:
- piece of Java source code
-
virtual
static String virtual(VariableExpression variable, VirtualSpecification virtual, boolean remotelyAccessed) Java Coding: Edit Call Procedure Virtual.- Parameters:
variable- the procedure variablevirtual- the virtual specificationremotelyAccessed- true if remotely accessed.- Returns:
- piece of Java source code
-
remoteVirtual
static String remoteVirtual(Expression obj, VariableExpression variable, VirtualSpecification virtual) Java Coding: Edit Call Procedure Remote Virtual.- Parameters:
obj- Object Expression before DOTvariable- the procedure variablevirtual- Virtual Specification- Returns:
- piece of Java source code
-
codeCPF
private static String codeCPF(String ident, VariableExpression variable, ProcedureSpecification procedureSpec) Java Coding Utility: Edit Call Procedure Formal.- Parameters:
ident- the procedure identifiervariable- the procedure variableprocedureSpec- the procedure spec- Returns:
- the resulting Java source code
-
codeCSVP
private static String codeCSVP(String ident, VariableExpression variable, ProcedureSpecification procedureSpec) Java Coding Utility: Edit Call Specified Virtual Procedure.- Parameters:
ident- the procedure identifiervariable- the procedure variableprocedureSpec- the procedure spec- Returns:
- the resulting Java source code
-
edProcedureParameters
private static String edProcedureParameters(VariableExpression variable, String SL, ProcedureDeclaration procedure) Java Coding Utility: Edit procedure parameters.- Parameters:
variable- a variableSL- static linkprocedure- the procedure- Returns:
- the resulting Java source code
-
getNdim
Returns the array's number of dimensions.- Parameters:
actualParameter- the array parameter- Returns:
- the array's number of dimensions.
-
doParameterTransmition
Java Coding Utility: Edit parameter transmission,- Parameters:
formalType- parameter's formal typekind- parameter's kindmode- parameter's transmission modeapar- the actual parameter- Returns:
- the resulting Java source code
-
doSimpleParameter
Java Coding Utility: Edit simple parameter into the given StringBuilder.- Parameters:
s- the StringBuilderformalType- the formal typemode- the parameter's modeapar- actual parameter
-
doArrayParameter
Java Coding Utility: Edit Array as Actual Parameter into the given StringBuilder.- Parameters:
s- the StringBuilderformalType- the formal typemode- the parameter modeapar- actual parameter
-
doProcedureParameter
private static void doProcedureParameter(StringBuilder s, Type formalType, int mode, Expression apar) Java Coding Utility: Edit Procedure as Actual Parameter into the given StringBuilder.- Parameters:
s- the StringBuilderformalType- the formal typemode- the parameter modeapar- actual parameter
-
edProcedureQuant
Java Coding Utility: Edit new procedure quant.- Parameters:
apar- the actual parameter- Returns:
- the resulting Java source code
-