cdc.mf.model.MfUsage Maven / Gradle / Ivy
The newest version!
package cdc.mf.model;
/**
* Description of the usage of an element.
*
* @author Damien Carbonne
*/
public class MfUsage {
private final MfElement element;
private final Kind kind;
private final boolean direct;
/**
* Enumeration of possible kinds of usage.
*
* @author Damien Carbonne
*/
enum Kind {
/**
* A type is used by a property.
*/
PROPERTY_TYPE,
/**
* A type is used by a parameter.
*/
PARAMETER_TYPE,
/**
* A type is used by a navigable source tip.
*/
NAVIGABLE_SOURCE_TYPE,
/**
* A type is used by a non-navigable source tip.
*/
NON_NAVIGABLE_SOURCE_TYPE,
/**
* A type is used by a navigable target tip.
*/
NAVIGABLE_TARGET_TYPE,
/**
* A type is used by a non-navigable target tip.
*/
NON_NAVIGABLE_TARGET_TYPE,
/**
* A type is extended.
*/
EXTENSION,
/**
* A type (interface) is implemented.
*/
IMPLEMENTATION;
}
public MfUsage(MfElement element,
Kind kind,
boolean direct) {
this.element = element;
this.kind = kind;
this.direct = direct;
}
public MfElement getElement() {
return element;
}
public Kind getKind() {
return kind;
}
public boolean isDirect() {
return direct;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy