Class DefaultScopeResolver
java.lang.Object
com.blackrook.rookscript.resolvers.scope.DefaultScopeResolver
- All Implemented Interfaces:
- ScriptScopeResolver
An single, scoped open variable set in which values can be set.
 All variable names are CASE-INSENSITIVE.
 The internals are written so that the storage uses few memory allocations/deletions.
 None of the variables are read-only. This implementation is thread-safe.
- Author:
- Matthew Tropiano
- 
Field SummaryFields inherited from interface com.blackrook.rookscript.resolvers.ScriptScopeResolverEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new default scope resolver with no added scopes.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddScope(String name, ScriptVariableResolver resolver) Adds a scope to this scope resolver by name.voidclear()Clears this scope resolver of all added scope mappings.booleancontainsScope(String name) Checks if this contains a scope by its scope name.Gets the corresponding scope for a scope name.
- 
Constructor Details- 
DefaultScopeResolverpublic DefaultScopeResolver()Creates a new default scope resolver with no added scopes.
 
- 
- 
Method Details- 
addScopeAdds a scope to this scope resolver by name.- Parameters:
- name- the name of the scope.
- resolver- the resolver to resolve by that name.
 
- 
clearpublic void clear()Clears this scope resolver of all added scope mappings.
- 
getScopeDescription copied from interface:ScriptScopeResolverGets the corresponding scope for a scope name.- Specified by:
- getScopein interface- ScriptScopeResolver
- Parameters:
- name- the scope name.
- Returns:
- the corresponding scope, or nullif no corresponding scope.
 
- 
containsScopeDescription copied from interface:ScriptScopeResolverChecks if this contains a scope by its scope name.- Specified by:
- containsScopein interface- ScriptScopeResolver
- Parameters:
- name- the scope name.
- Returns:
- true if so, false if not.
 
 
-