edu.isi.stella
Class Context
java.lang.Object
edu.isi.stella.Stella_Object
edu.isi.stella.StandardObject
edu.isi.stella.Thing
edu.isi.stella.Context
- Direct Known Subclasses:
- Module, World
public abstract class Context
- extends Thing
Method Summary |
static Stella_Object |
accessContextSlotValue(Context self,
Symbol slotname,
Stella_Object value,
boolean setvalueP)
|
static AllPurposeIterator |
allSubcontexts(Context context,
Keyword traversal)
Return an iterator that generates all subcontexts of
'self' (not including 'self') in the order specified by 'traversal' (one
of :preorder, :inorder, :postorder or :topdown). |
Context |
changeContext()
Change the current context to be the context
'context'. |
static Context |
changeContextSlowly(Context self)
|
static Context |
changeCurrentContext(Context context)
|
static void |
clearContext(Context self)
Destroy all objects belonging to 'self' or any of its subcontexts. |
static void |
clearOneContext(Context self)
|
java.lang.String |
contextName()
|
static World |
createWorld(Context parentcontext,
java.lang.String name)
Create a new world below the world or module 'parentContext'. |
boolean |
deletedP()
Default deletedP method which always returns FALSE. |
void |
destroyContext()
Make the translator happy. |
static boolean |
discardedContextP(Context context)
|
static void |
helpClearContext(Context self)
|
void |
helpPrintOutline(OutputStream stream,
int currentDepth,
int depth,
boolean namedP)
Helper method for printOutline |
Module |
homeModule()
Return the home module of self . |
void |
inheritSupercontexts()
|
boolean |
multipleParentsP()
|
Iterator |
parentContexts()
|
static void |
printContext(Context self,
java.io.PrintStream stream)
|
static void |
printContextTree(Context root)
|
void |
printObject(java.io.PrintStream stream)
|
static boolean |
subcontextP(Context subcontext,
Context supercontext)
|
void |
uninheritSupercontexts()
|
static boolean |
visibleFromP(Context viewedcontext,
Context fromcontext)
|
Methods inherited from class edu.isi.stella.StandardObject |
arrayTypeSpecifierP, baseTypeToTypeSpec, cantOverwriteActiveCollectionSlot, compatibleParameterTypesP, computeAnchoredTypeSpec, computeRelativeTypeSpec, conformingTypeSpecP, copyWrappedLiteral, cppReferenceTypeP, cppReferencizeType, cppTranslateAndPointerizeTypeSpec, cppTranslateAndReferencizeTypeSpec, cppTranslateTypeSpec, dropSlotValue, extractParameterType, extractRequiredArgumentValues, getSlot, hashCode_, idlTranslateTypeSpec, inverseSlotDemon, javaLiteralP, javaNativeLiteralWrapperNames, javaSpecialSetterName, javaTranslateArrayOfTypeSpec, javaTranslateTypeSpec, javaTranslateTypeSpecForFunction, javaTranslateTypeSpecHelper, javaYieldClassObjectArrayExpression, javaYieldClassObjectExpression, javaYieldFullyQualifiedTypeName, javaYieldTranslatedClassAndMethodNames, listifyTypeSpec, lookupClTypeFromStellaType, objectEqlP, putSlotValue, readSlotValue, runConstructorDemons, runDestructorDemons, runSlotDemons, runSlotGuardDemonsP, standardObjectP, subTypeSpecOfP, twoArgumentLeastCommonSupertype, typeSpecToBaseType, typeSpecToClass, typeToWalkedNullValueTree, validateTypeSpecifier, voidP, walkTypeSpecIsNativeTypeP, writeSlotValue, yieldTypeSpecTree |
Methods inherited from class edu.isi.stella.Stella_Object |
_, accessInContext, amPm, anchoredTypeSpecifierP, andOrNotTreeP, applyCoercionMethod, atomicExpressionP, bindToSurrogateP, booleanP, bootstrapIsaP, bquotify, cast, characterP, clTranslateAtomicTree, clTranslateATree, clTranslateBooleanTest, clTranslatePlainBooleanTest, clTranslateVerbatimBodySymbols, clYieldTypedExpressionTree, coerceATree, coerceEvaluatedTree, coerceMvTree, coerceToBoolean, coerceToModule, coerceToModuleName, coerceToSymbol, coerceToXmlElement, coercibleP, collectFeatureList, collectKeyValueList, commonLispSymbolP, computeExpressionType, cons, consify, consifyListsAndIterators, consP, consTreeMatchP, convertToLiteral, copyConsTree, cppArgumentIsStreamP, cppBinaryOperatorP, cppBlockP, cppMaybeOutputStatementWithParentheses, cppOperatorP, cppOutputAtomicExpression, cppOutputLiteral, cppOutputOneActualParameter, cppOutputStatement, cppOutputTypedEntity, cppPrognifyStatement, cppPrognP, cppStatementToList, cppStreamIsStandardOutputP, cpptrans, cppTranslateAtomicTree, cppTranslateATree, cppTranslatedArrayTypeP, csValueP, dateDivider, dateTimeDivider, day, dealWithAmPm, dealWithEra, dealWithNoonMidn, decrementReferenceCount, defaultOptionHandler, defineSystem, defmodule, describe, describeObject, describeTersely, destructureMethodNameTree, deUglifyParseTree, either, eqlP, eqlToBooleanP, eqlToCharacterP, eqlToFloatP, eqlToIntegerP, eqlToStringP, equalConsTreesP, equalHashCode, equalP, era, estimatedEvaluationCost, evaluate, evaluateArgumentTree, evaluateAtomicTree, evaluateCommand, expandBquoteTree, filterModuleP, floatP, free, get, getObject, hashlist, hashMemoizedArguments, helpBquotify, helpClTranslateATree, helpCoerceATree, helpLptrans, helpTransformBooleanProceduralExpression, helpWalkATree, hour, idlOutputAtomicExpression, idlOutputLiteral, idlOutputStatement, idlTranslateAtomicTree, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputLiteral, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateAtomicTree, javaTranslateATree, javaTranslateWithNativeWrapper, jptrans, keywordP, kvCons, legalTokenizerFromStateP, legalTokenizerStateP, legalTokenizerToStateP, literalEqlP, logLevelLE, lptrans, makeFileNameFromRelativePath, makeMemoizedValueEntry, makeMemoizedValueEntryn, matchConsTree, methodSlotP, minute, month, nameToString, nilP, noonMidn, numberWrapperToFloat, objectEqualP, objectHashCode, one, oneI, onlyIf, parametricTypeSpecifierP, parseArrayDimensionsSpec, parseTokenizerCharacterSpec, parseTokenizerStateModifiers, permanentCopy, permanentify, permanentifyForm, po, prettyPrintLiteral, primaryClass, primaryType, printOutline, printStellaCode, printStellaDefinition, printUndefinedSuperClasses, proceduralExpressionP, ptrans, publicSlots, registerRecycledItem, runOptionHandlerP, safeEqualHashCode, safeHashCode, safePrimaryType, safeYieldTypeSpecifier, searchConsTreeP, searchConsTreeWithFilterP, searchForObject, secondp, sideEffectFreeExpressionP, simplifyBquoteTree, specialp, stella_Increment, stellaClassP, stellaCollectionP, stellaNeedToCompileP, stellaNeedToTranslateP, stellaObjectP, stellify, storageSlotP, stringifyInModule, stringP, substituteConsTree, substituteOnce, surrogateP, surrogatify, sweep, symbolCaseP, symbolP, sysTree, targetLanguageType, taxonomyIsaP, timeDivider, timeMultiply, tokenizerIncludeSpecP, tokenizerToStateAlias, tokenizerToStateName, toString, traceIf, traceKeywordP, transientifyForm, transientObjectP, transientSymbolP, translateWalkedTree, treeSize, treeToTrees, trueOptionP, tryToEvaluate, typeP, typify, unmake, unregisterRecycledItem, updateInContext, valuesTreeP, variableExpressionP, verbatimStringP, verbatimTreeP, vetOptions, vrletExpressionP, walkAtomicTree, walkATree, walkCollectionTree, walkDontCallMeTree, walkedExpressionType, walkExpressionTree, walkMvExpressionTree, walkMvTree, walkStatement, walkTopLevelExpression, walkWithoutTypeTree, warnAboutUnknownSourceType, weekday, withinContext, withinModule, withinWorld, withStellaTokenizer, withSystemDefinition, withTokenizer, wrapperP, wrapWhereTest, xmlAttributeP, xmlCdataFormP, xmlCdataP, xmlDeclarationFormP, xmlDeclarationP, xmlDoctypeFormP, xmlElementFormP, xmlElementP, xmlnsAttributeP, xmlProcessingInstructionFormP, xmlProcessingInstructionP, xmlTagCase, year, yieldCondTest, yieldCondTestOrTests, yieldHardcodedCaseSymbolIdOrIds, yieldInCursorClausesForArgumentList, yieldInCursorClausesForGeneralCollection, yieldInCursorClausesForVector, yieldTypeSpecifier, zone, zoneMinute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
childContexts
public List childContexts
baseModule
public Module baseModule
allSuperContexts
public Cons allSuperContexts
contextNumber
public int contextNumber
Context
public Context()
helpPrintOutline
public void helpPrintOutline(OutputStream stream,
int currentDepth,
int depth,
boolean namedP)
- Helper method for
printOutline
- Overrides:
helpPrintOutline
in class Stella_Object
- Parameters:
stream
- currentDepth
- depth
- namedP
-
printContextTree
public static void printContextTree(Context root)
printContext
public static void printContext(Context self,
java.io.PrintStream stream)
changeContextSlowly
public static Context changeContextSlowly(Context self)
deletedP
public boolean deletedP()
- Description copied from class:
Stella_Object
- Default
deletedP
method which always returns FALSE. Objects
that inherit DYNAMIC-SLOTS-MIXIN also inherit the dynamically-allocated slot
deletedObjectP
which is read/writable with specializations of this method.
- Overrides:
deletedP
in class Thing
- Returns:
- boolean
discardedContextP
public static boolean discardedContextP(Context context)
subcontextP
public static boolean subcontextP(Context subcontext,
Context supercontext)
clearContext
public static void clearContext(Context self)
- Destroy all objects belonging to 'self' or any of its subcontexts.
- Parameters:
self
-
helpClearContext
public static void helpClearContext(Context self)
clearOneContext
public static void clearOneContext(Context self)
visibleFromP
public static boolean visibleFromP(Context viewedcontext,
Context fromcontext)
allSubcontexts
public static AllPurposeIterator allSubcontexts(Context context,
Keyword traversal)
- Return an iterator that generates all subcontexts of
'self' (not including 'self') in the order specified by 'traversal' (one
of :preorder, :inorder, :postorder or :topdown).
- Parameters:
context
- traversal
-
- Returns:
- AllPurposeIterator
createWorld
public static World createWorld(Context parentcontext,
java.lang.String name)
- Create a new world below the world or module 'parentContext'.
Optionally, specify a name.
- Parameters:
parentcontext
- name
-
- Returns:
- World
destroyContext
public void destroyContext()
- Make the translator happy.
uninheritSupercontexts
public void uninheritSupercontexts()
inheritSupercontexts
public void inheritSupercontexts()
multipleParentsP
public boolean multipleParentsP()
changeContext
public Context changeContext()
- Change the current context to be the context
'context'.
- Returns:
- Context
changeCurrentContext
public static Context changeCurrentContext(Context context)
parentContexts
public Iterator parentContexts()
printObject
public void printObject(java.io.PrintStream stream)
- Overrides:
printObject
in class Thing
accessContextSlotValue
public static Stella_Object accessContextSlotValue(Context self,
Symbol slotname,
Stella_Object value,
boolean setvalueP)
homeModule
public Module homeModule()
- Description copied from class:
Stella_Object
- Return the home module of
self
.
- Overrides:
homeModule
in class Stella_Object
- Returns:
- Module
contextName
public java.lang.String contextName()