Class EGModule
- java.lang.Object
-
- org.qdl_lang.module.Module
-
- org.qdl_lang.extensions.JavaModule
-
- org.qdl_lang.extensions.examples.basic.EGModule
-
- All Implemented Interfaces:
Serializable
,Cloneable
,XThing
public class EGModule extends JavaModule
The module for the basic. This sets the namespace and an alias (for people using the old module system). It is charged with creating new instances of itself and holds module level documentation.Created by Jeff Gaynor
on 4/2/20 at 8:09 AM- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.qdl_lang.extensions.JavaModule
funcs, vars
-
Fields inherited from class org.qdl_lang.module.Module
FDOC_CONVERT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getDescription()
TheJavaModule.createDefaultDocs()
will create basic documentation for functions and such, and is called automatically during moduleJavaModule.init(State)
, but the actual description of this module -- if any -- is done here.Module
newInstance(State state)
Modules are effectively templates.-
Methods inherited from class org.qdl_lang.extensions.JavaModule
addFunctions, addVariables, createDefaultDocs, deserializeFromJSON, deserializeStates, getClassname, getDocumentation, getListByTag, getLoaderClassName, getMetaClass, hasMetaClass, init, init, isExternal, serializeToJSON, setClassName, setDocumentation, setLoaderClassName, setMetaClass, toString, writeExtraXMLAttributes
-
Methods inherited from class org.qdl_lang.module.Module
fromJSON, fromXML, fromXML, getAlias, getId, getInheritMode, getKey, getListByTag, getMTKey, getName, getNamespace, getParentInstanceAlias, getParentInstanceID, getParentTemplateID, getState, isTemplate, isUsed, readExtraXMLAttributes, readExtraXMLElements, setAlias, setId, setInheritanceMode, setNamespace, setParentInstanceAlias, setParentInstanceID, setParentTemplateID, setState, setTemplate, setupModule, setUsed, toJSON, toXML, toXML, toXML2, writeExtraXMLElements
-
-
-
-
Method Detail
-
newInstance
public Module newInstance(State state)
Description copied from class:Module
Modules are effectively templates. This passes in the state of the parser at the point a new module is required and the contract is to create a new instance of this module with the state. Note that the state passed in may have nothing to do with the state here. You are creating a new module for the given state using this as a template.
All implementations should gracefully handle a null state with the assumption that the full state will be set later. This is because of bootstrapping networks of modules during deserialization.- Specified by:
newInstance
in classModule
- Returns:
-
getDescription
public List<String> getDescription()
Description copied from class:JavaModule
TheJavaModule.createDefaultDocs()
will create basic documentation for functions and such, and is called automatically during moduleJavaModule.init(State)
, but the actual description of this module -- if any -- is done here. Override and return your description.- Overrides:
getDescription
in classJavaModule
- Returns:
-
-