public class ScopeKey extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
static ScopeKey |
DEFAULT_SCOPE
The default scope
|
Constructor and Description |
---|
ScopeKey()
Create a new ScopeKey.
|
ScopeKey(Collection<Scope> scopes)
Create a new ScopeKey.
|
ScopeKey(Scope scope)
Create a new ScopeKey.
|
ScopeKey(Scope[] scopes)
Create a new ScopeKey.
|
ScopeKey(ScopeLevel level,
Object qualifier)
Create a new ScopeKey.
|
Modifier and Type | Method and Description |
---|---|
Scope |
addScope(Scope scope)
Add a scope
|
Scope |
addScope(ScopeLevel level,
Object qualifier)
Add a scope
|
ScopeKey |
clone()
Clone a ScopeKey instance.
|
protected static int |
computeHashCode(Iterable<Scope> scopeCollection) |
protected static int |
computeHashCode(Scope[] scopeArray) |
boolean |
equals(Object object) |
void |
freeze()
Set to frozen.
|
protected Scope[] |
getArray() |
ScopeLevel |
getMaxScopeLevel()
Get the maximum scope level
|
ScopeKey |
getOptimizedKey()
The returned ScopeKey is immutable and optimized for use at runtime.
|
ScopeKey |
getParent()
Get the parent scope key
|
Scope |
getScope(ScopeLevel level)
Get a scope
|
Scope |
getScopeLevel(ScopeLevel scopeLevel)
Get a scope level
|
Collection<Scope> |
getScopes()
Get the scopes
|
protected Collection<Scope> |
getScopesCollection() |
int |
hashCode() |
boolean |
isFrozen()
Get the frozen.
|
boolean |
isParent(ScopeKey key)
Is this parent of key parameter.
|
Scope |
removeScope(Scope scope)
Remove a scope
|
Scope |
removeScopeLevel(ScopeLevel scopeLevel)
Remove a scope level
|
String |
toString() |
public static final ScopeKey DEFAULT_SCOPE
public ScopeKey()
public ScopeKey(Scope scope)
scope
- the scopepublic ScopeKey(ScopeLevel level, Object qualifier)
level
- the scope levelqualifier
- the scope qualifierpublic ScopeKey(Collection<Scope> scopes)
scopes
- is a collection of Scope instances that make up the represented pathIllegalArgumentException
- if parameter scopes is nullpublic ScopeKey(Scope[] scopes)
scopes
- is zero or more Scope instances that make up the represented pathIllegalArgumentException
- if parameter scopes is nullpublic boolean isFrozen()
public void freeze()
IllegalArgumentException
- if there are no Scope entries added.public ScopeKey getOptimizedKey()
public Collection<Scope> getScopes()
public Scope getScope(ScopeLevel level)
level
- the scope levelIllegalArgumentException
- if level is null.public ScopeLevel getMaxScopeLevel()
public ScopeKey getParent()
public boolean isParent(ScopeKey key)
key
- the key parameterIllegalArgumentException
- if parameter key is nullpublic Scope addScope(Scope scope)
scope
- the scopeIllegalArgumentException
- if scope is null.IllegalStateException
- if frozenpublic Scope addScope(ScopeLevel level, Object qualifier)
level
- the scope levelqualifier
- the scope qualifierpublic Scope removeScope(Scope scope)
scope
- the scopepublic Scope getScopeLevel(ScopeLevel scopeLevel)
scopeLevel
- the scope levelIllegalArgumentException
- if parameter key is nullpublic Scope removeScopeLevel(ScopeLevel scopeLevel)
scopeLevel
- the scope levelpublic ScopeKey clone()
protected Scope[] getArray()
protected Collection<Scope> getScopesCollection()
protected static int computeHashCode(Scope[] scopeArray)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.