org.eclipse.jst.jsf.designtime.resolver
Class AbstractSymbolContextResolver
java.lang.Object
org.eclipse.jst.jsf.designtime.resolver.AbstractSymbolContextResolver
- All Implemented Interfaces:
- IContextResolver, IDocumentContextResolver, ISymbolContextResolver
- Direct Known Subclasses:
- CachingSymbolContextResolver
public abstract class AbstractSymbolContextResolver
- extends java.lang.Object
- implements ISymbolContextResolver
An abstract that should sub-classed by clients wishing to implement
the ISymbolContextResolver interface
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSymbolContextResolver
public AbstractSymbolContextResolver()
getAllVariables
public abstract ISymbol[] getAllVariables()
- Specified by:
getAllVariables
in interface ISymbolContextResolver
- Returns:
- all valid symbols in the current context
getMethod
public abstract IMethodSymbol getMethod(IObjectSymbol base,
java.lang.Object methodName)
- Specified by:
getMethod
in interface ISymbolContextResolver
- Returns:
- the method of base matching methodName or null if not found
getMethods
public abstract ISymbol[] getMethods(IObjectSymbol base)
- Specified by:
getMethods
in interface ISymbolContextResolver
- Returns:
- all methods belonging to base
getProperties
public abstract ISymbol[] getProperties(ISymbol symbol)
- Specified by:
getProperties
in interface ISymbolContextResolver
- Returns:
- all properties of symbol
getProperty
public abstract ISymbol getProperty(ISymbol symbol,
java.lang.Object propertyName)
- Specified by:
getProperty
in interface ISymbolContextResolver
- Returns:
- the property symbol called propertyName or null if not found
getVariable
public abstract ISymbol getVariable(java.lang.String name)
- Description copied from interface:
ISymbolContextResolver
- Gets the most appropriate symbol in the current context
based on name. Most "appropriate" may take into account
scoping and other rules.
- Specified by:
getVariable
in interface ISymbolContextResolver
- Returns:
- a symbol
canResolveContext
public abstract boolean canResolveContext(IModelContext modelContext)
- Specified by:
canResolveContext
in interface IContextResolver
- Returns:
- true if this resolver can resolve context information
based on this context
hasSameResolution
public boolean hasSameResolution(IModelContext modelContext)
- Default implementation
We should avoid returning true unless we are positive that changing
to this context won't change the way symbols are resolved.
- Specified by:
hasSameResolution
in interface ISymbolContextResolver
- Returns:
- true if the instance of this resolver would resolve everything
exactly the same with this modelContext. False otherwise.