Class MultipleInheritanceEngine
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.inheritance.MultipleInheritanceEngine
-
public class MultipleInheritanceEngine extends Object
Resolves ordered multiple inheritance lists, used e.g. in configurations. This only works on names and relations between them. It returns a list of names (all names and aliases are assumed unique).Multiple Inheritance Model
There are many multiple inheritance schemes. This supports linearly order-based inheritance. So this engine gets lists of overrides (unique names) and aliases (unique) and makes a list. It is then up to the calling program to navigate the inheritance order. This allows for an easy solution to the so-called diamond problem which cannot exist here because of the linear ordering.
Created by Jeff Gaynor
on 2/2/21 at 6:29 AM
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG_ON
-
Constructor Summary
Constructors Constructor Description MultipleInheritanceEngine(InheritanceMap atomicNodes, InheritanceMap unresolvedAliases, InheritanceMap unresolvedOverrides)
-
Method Summary
-
-
-
Constructor Detail
-
MultipleInheritanceEngine
public MultipleInheritanceEngine(InheritanceMap atomicNodes, InheritanceMap unresolvedAliases, InheritanceMap unresolvedOverrides)
-
-
Method Detail
-
isResolutionsRun
public boolean isResolutionsRun()
If the resolve method for this class has been run sucessfully.- Returns:
-
getAtomicNodes
public InheritanceMap getAtomicNodes()
-
setAtomicNodes
public void setAtomicNodes(InheritanceMap atomicNodes)
-
getUnresolvedAliases
public InheritanceMap getUnresolvedAliases()
-
setUnresolvedAliases
public void setUnresolvedAliases(InheritanceMap unresolvedAliases)
-
getUnresolvedOverrides
public InheritanceMap getUnresolvedOverrides()
-
setUnresolvedOverrides
public void setUnresolvedOverrides(InheritanceMap unresolvedOverrides)
-
getResolvedAliases
public Map<String,AliasAndOverrides> getResolvedAliases()
-
setResolvedAliases
public void setResolvedAliases(InheritanceMap resolvedAliases)
-
getResolvedOverrides
public Map<String,InheritanceList> getResolvedOverrides()
-
setResolvedOverrides
public void setResolvedOverrides(Map<String,InheritanceList> resolvedOverrides)
-
resolve
public void resolve()
-
debugPrint
protected void debugPrint()
-
resolveAlias
protected void resolveAlias()
-
resolveInhertanceList
protected InheritanceList resolveInhertanceList(AliasAndOverrides aao)
Loops through a list that is not resolved. If every element in the list is resolved, they are replaced with their resolution. If this fails (for instance, there is an unresolved alias on the list) then null is returned. Generally invoke this and if null, skip it.- Parameters:
aao
-- Returns:
-
resolveSimpleOverrides
protected void resolveSimpleOverrides()
-
resolveAliasOverrides
protected void resolveAliasOverrides()
-
resolveAliasOverrides2
protected void resolveAliasOverrides2()
Snoops through the aliases by tracing the known resolved nodes.
-
-