public class BindingDatabase extends Object
Modifier and Type | Field and Description |
---|---|
int |
_watchersCreated
test only field.
|
static WeakHashMap<IClassDefinition,BindingDatabase> |
bindingMap |
Constructor and Description |
---|
BindingDatabase() |
Modifier and Type | Method and Description |
---|---|
static void |
_setDiagnosticLogger(List<BindingDatabase> logger)
Unit tests may use this API to get notified of Database creation
Here are the rules:
Don't call this from production code - just for unit testsing
Always call later with null to remove the logger
|
BindingInfo |
analyze(IMXMLDataBindingNode node,
Collection<ICompilerProblem> problems,
MXMLClassDirectiveProcessor host)
Will do the binding analysis on a single binding node.
|
void |
analyzeBindingNode(IMXMLBindingNode node,
Collection<ICompilerProblem> problems,
MXMLClassDirectiveProcessor host)
Will do the binding analysis on a single binding node.
|
void |
finishAnalysis()
Must be called once after all the nodes in a document have been analyzed
|
Set<BindingInfo> |
getBindingInfo() |
int |
getNumWatchers() |
WatcherInfoBase |
getOrCreateWatcher(WatcherInfoBase parent,
WatcherInfoBase.WatcherType type,
Object watcherKey,
Collection<ICompilerProblem> problems,
IASNode sourceNode,
List<String> eventNames)
Searches for appropriate existing watcher, or creates new one.
|
boolean |
getRequiresPropertyGetter() |
ASScope |
getScope()
returns the containing scope of one of the databinding nodes that have been analyzed
|
Map<Integer,Integer> |
getTwoWayBindingInfoPairs()
returns a map relating BindingInfos that are paired in two way bindings
If a binding is returns as a key, it will also not be found as a value - each
binding only appears once
|
Set<Map.Entry<Object,WatcherInfoBase>> |
getWatcherChains() |
void |
setScope(ASScope scope) |
String |
toString()
just for debugging
|
public static WeakHashMap<IClassDefinition,BindingDatabase> bindingMap
public int _watchersCreated
public static void _setDiagnosticLogger(List<BindingDatabase> logger)
public BindingInfo analyze(IMXMLDataBindingNode node, Collection<ICompilerProblem> problems, MXMLClassDirectiveProcessor host)
public void analyzeBindingNode(IMXMLBindingNode node, Collection<ICompilerProblem> problems, MXMLClassDirectiveProcessor host)
public void finishAnalysis()
public Set<BindingInfo> getBindingInfo()
public Map<Integer,Integer> getTwoWayBindingInfoPairs()
public Set<Map.Entry<Object,WatcherInfoBase>> getWatcherChains()
public int getNumWatchers()
public boolean getRequiresPropertyGetter()
public ASScope getScope()
public void setScope(ASScope scope)
public WatcherInfoBase getOrCreateWatcher(WatcherInfoBase parent, WatcherInfoBase.WatcherType type, Object watcherKey, Collection<ICompilerProblem> problems, IASNode sourceNode, List<String> eventNames)
parent
- - the parent watcher of the watcher we are interested in, or null for root watcherstype
- - type type of watcher we want to find/createwatcherKey
- - the object that identifies this watcher (map key). Often it is the definition, but we
don't always have a definition for dynamic propertiesproblems
- - if semantic problems are found, report them here.sourceNode
- - parse node we are basing the watcher oneventNames
- - a list of events that the watcher must listen forCopyright © 2016 The Apache Software Foundation. All rights reserved.