public final class ElementScope
extends java.lang.Object
A scope is composed of a metaclass and a stereotype. Both values are optional but at least one of these two fields must be provided.
Constructor and Description |
---|
ElementScope(MClass metaclass,
boolean withSubClasses,
Stereotype stereotype,
boolean withSubStereotypes)
A scope is composed of a metaclass and a stereotype.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
MClass |
getMetaclass() |
Stereotype |
getStereotype() |
int |
hashCode() |
boolean |
isMatching(MObject e)
Check that the given element matches the scope's metaclass/stereotype.
|
boolean |
isWithSubClasses() |
boolean |
isWithSubStereotypes() |
public ElementScope(MClass metaclass, boolean withSubClasses, Stereotype stereotype, boolean withSubStereotypes)
Both values are optional but at least one of these two fields must be provided.
metaclass
- a metaclass. Might be null
withSubClasses
- whether or not metaclass inheritance should be considered for the checkstereotype
- a stereotype. Might be null
withSubStereotypes
- whether or not stereotype inheritance should be considered for the checkpublic boolean isWithSubClasses()
public boolean isWithSubStereotypes()
public MClass getMetaclass()
public Stereotype getStereotype()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final boolean isMatching(MObject e)
e
- the element to check.true
if the element matches the scope's metaclass/stereotype.