public class BasicModulePart extends AbstractNamespace implements ModulePart
Constructor and Description |
---|
BasicModulePart(NamespaceModel parent)
Creates new instance.
|
BasicModulePart(String name,
NamespaceModel parent)
Creates new instance.
|
BasicModulePart(String name,
NamespaceModel parent,
Collection<? extends Module> imports)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferencedOperation(ReferencedOperation refOper)
Adds referenced operation so that it can be referenced for expressions compiled to java.
|
void |
addSignature(FunctionSignature signature)
Registers a function signature in this namespace.
|
Map<String,Module> |
allImportedModules()
Returns an immutable map of all imports.
|
Collection<FunctionSignature> |
getLocalSignaturesForName(String name)
Returns the local function signatures for given name.
|
Module |
getModule()
Returns the enclosing module.
|
NamespaceModel |
getParent()
Returns the parent namespace or null.
|
ReferencedOperation |
getReferencedOperation(String id)
Returns operation for the id.
|
Collection<FunctionSignature> |
getSignatures()
Returns function signatures defined in this namespace.
|
ClassType |
getStaticType()
Returns type for this namespace used for static methods.
|
ClassType |
getThisType()
Returns type for this namespace.
|
NamedType |
getTypeForName(String typeName)
Returns registered named type corresponding to given name.
|
Collection<VariableInfo> |
getVisibleVariables()
Returns a collection of all visible variables.
|
protected Map<String,Module> |
importedModules()
Returns an immutable map of imports.
|
boolean |
isModule()
Returns true if this is a module.
|
String |
toString() |
addModules, addVariable, addVariable, addVariable, addVariable, findNamedType, getAllImportedModules, getAlternativeName, getCompiled, getConstants, getExtensionMethods, getExtensionMethods, getImportedModuleByName, getImportedModules, getName, getSignatures, getSignaturesForName, getSignaturesForName, getSignaturesForNamedArgs, getVariable, getVariable, getVariablePrivacy, getVariables, getVariables, getVisibleConstants, getVisibleNamedTypes, getVisibleRecordTypes, getVisibleSignatures, setAlternativeName, setCompiled, validateIdentifier
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addVariable, addVariable, addVariable, addVariable, findNamedType, getAllImportedModules, getAlternativeName, getCompiled, getConstants, getExtensionMethods, getExtensionMethods, getImportedModuleByName, getImportedModules, getName, getSignatures, getSignaturesForName, getSignaturesForName, getSignaturesForNamedArgs, getVariable, getVariable, getVariablePrivacy, getVariables, getVariables, getVisibleConstants, getVisibleNamedTypes, getVisibleRecordTypes, getVisibleSignatures, setAlternativeName, setCompiled, validateIdentifier
public BasicModulePart(NamespaceModel parent)
parent
- public BasicModulePart(String name, NamespaceModel parent)
name
- parent
- public BasicModulePart(String name, NamespaceModel parent, Collection<? extends Module> imports)
name
- parent
- imports
- public String toString()
toString
in class AbstractNamespace
protected Map<String,Module> importedModules()
AbstractNamespace
importedModules
in class AbstractNamespace
public Map<String,Module> allImportedModules()
AbstractNamespace
allImportedModules
in class AbstractNamespace
public NamespaceModel getParent()
NamespaceModel
getParent
in interface NamespaceModel
public Module getModule()
NamespaceModel
getModule
in interface NamespaceModel
public NamedType getTypeForName(String typeName)
NamespaceModel
getTypeForName
in interface NamespaceModel
public void addSignature(FunctionSignature signature)
NamespaceModel
addSignature
in interface NamespaceModel
signature
- function signature to be registered in this namespacepublic final Collection<FunctionSignature> getSignatures()
NamespaceModel
getSignatures
in interface NamespaceModel
public Collection<FunctionSignature> getLocalSignaturesForName(String name)
NamespaceModel
getLocalSignaturesForName
in interface NamespaceModel
public Collection<VariableInfo> getVisibleVariables()
NamespaceModel
getVisibleVariables
in interface NamespaceModel
getVisibleVariables
in class AbstractNamespace
public boolean isModule()
NamespaceModel
isModule
in interface NamespaceModel
public ClassType getThisType()
NamespaceModel
getThisType
in interface NamespaceModel
public ClassType getStaticType()
NamespaceModel
getStaticType
in interface NamespaceModel
public void addReferencedOperation(ReferencedOperation refOper)
NamespaceModel
addReferencedOperation
in interface NamespaceModel
public ReferencedOperation getReferencedOperation(String id)
NamespaceModel
getReferencedOperation
in interface NamespaceModel
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.