Package org.qdl_lang.functions
Class FR_WithState
- java.lang.Object
-
- org.qdl_lang.functions.FR_WithState
-
- All Implemented Interfaces:
Serializable
,Cloneable
,FunctionRecordInterface
,XThing
public class FR_WithState extends Object implements FunctionRecordInterface
A facade for a function record. This however has the local state. It is used as a function reference and passed as e.g. an argument. So in f(@foo) @foo would be one of these.Created by Jeff Gaynor
on 1/26/20 at 7:30 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description FunctionRecordInterface
functionRecord
boolean
isExternalModule
boolean
isModule
AbstractState
state
-
Constructor Summary
Constructors Constructor Description FR_WithState()
FR_WithState(FunctionRecordInterface functionRecord, AbstractState state)
FR_WithState(FunctionRecordInterface functionRecord, AbstractState state, boolean isModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionRecordInterface
clone()
int
getArgCount()
List<String>
getArgNames()
List<String>
getDocumentation()
String
getfRefName()
FKey
getKey()
String
getName()
List<String>
getSourceCode()
List<Statement>
getStatements()
TokenPosition
getTokenPosition()
boolean
hasName()
boolean
hasState()
boolean
hasTokenPosition()
boolean
isAnonymous()
boolean
isExtrinsic()
boolean
isFuncRef()
boolean
isJavaFunction()
boolean
isLambda()
boolean
isOperator()
void
setfRefName(String fRefName)
void
setFuncRef(boolean funcRef)
void
setName(String name)
void
setOperator(boolean operator)
void
setSourceCode(List<String> sourceCode)
void
setStatements(List<Statement> statements)
String
toString()
-
-
-
Field Detail
-
functionRecord
public FunctionRecordInterface functionRecord
-
state
public AbstractState state
-
isExternalModule
public boolean isExternalModule
-
isModule
public boolean isModule
-
-
Constructor Detail
-
FR_WithState
public FR_WithState()
-
FR_WithState
public FR_WithState(FunctionRecordInterface functionRecord, AbstractState state, boolean isModule)
-
FR_WithState
public FR_WithState(FunctionRecordInterface functionRecord, AbstractState state)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceFunctionRecordInterface
- Specified by:
getName
in interfaceXThing
-
getKey
public FKey getKey()
- Specified by:
getKey
in interfaceFunctionRecordInterface
- Specified by:
getKey
in interfaceXThing
-
hasState
public boolean hasState()
-
isJavaFunction
public boolean isJavaFunction()
-
isAnonymous
public boolean isAnonymous()
- Specified by:
isAnonymous
in interfaceFunctionRecordInterface
-
isLambda
public boolean isLambda()
- Specified by:
isLambda
in interfaceFunctionRecordInterface
-
isExtrinsic
public boolean isExtrinsic()
- Specified by:
isExtrinsic
in interfaceFunctionRecordInterface
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceFunctionRecordInterface
-
getTokenPosition
public TokenPosition getTokenPosition()
- Specified by:
getTokenPosition
in interfaceFunctionRecordInterface
-
hasTokenPosition
public boolean hasTokenPosition()
- Specified by:
hasTokenPosition
in interfaceFunctionRecordInterface
-
hasName
public boolean hasName()
- Specified by:
hasName
in interfaceFunctionRecordInterface
-
getArgCount
public int getArgCount()
- Specified by:
getArgCount
in interfaceFunctionRecordInterface
-
clone
public FunctionRecordInterface clone()
- Specified by:
clone
in interfaceFunctionRecordInterface
- Overrides:
clone
in classObject
-
getArgNames
public List<String> getArgNames()
- Specified by:
getArgNames
in interfaceFunctionRecordInterface
-
getSourceCode
public List<String> getSourceCode()
- Specified by:
getSourceCode
in interfaceFunctionRecordInterface
-
setSourceCode
public void setSourceCode(List<String> sourceCode)
- Specified by:
setSourceCode
in interfaceFunctionRecordInterface
-
getDocumentation
public List<String> getDocumentation()
- Specified by:
getDocumentation
in interfaceFunctionRecordInterface
-
getfRefName
public String getfRefName()
- Specified by:
getfRefName
in interfaceFunctionRecordInterface
-
setfRefName
public void setfRefName(String fRefName)
- Specified by:
setfRefName
in interfaceFunctionRecordInterface
-
isOperator
public boolean isOperator()
- Specified by:
isOperator
in interfaceFunctionRecordInterface
-
setOperator
public void setOperator(boolean operator)
- Specified by:
setOperator
in interfaceFunctionRecordInterface
-
isFuncRef
public boolean isFuncRef()
- Specified by:
isFuncRef
in interfaceFunctionRecordInterface
-
setFuncRef
public void setFuncRef(boolean funcRef)
- Specified by:
setFuncRef
in interfaceFunctionRecordInterface
-
getStatements
public List<Statement> getStatements()
- Specified by:
getStatements
in interfaceFunctionRecordInterface
-
setStatements
public void setStatements(List<Statement> statements)
- Specified by:
setStatements
in interfaceFunctionRecordInterface
-
-