org.sdmlib.models.classes.Feature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SDMLib Show documentation
Show all versions of SDMLib Show documentation
SDMLib is a light weight modeling library. SDMLib intentionally comes without any tool or editor.
package org.sdmlib.models.classes;
import java.util.HashSet;
import de.uniks.networkparser.graph.Clazz;
public enum Feature
{
PropertyChangeSupport(new FeatureProperty()),
PatternObject(new FeatureProperty()),
Serialization(new FeatureProperty()),
ALBERTsSets(new FeatureProperty()),
REMOVEYOUMETHOD(new FeatureProperty());
private FeatureProperty feature;
Feature(FeatureProperty value) {
this.feature = value;
}
public static final HashSet getNone(){
return new HashSet();
}
public static HashSet getAll(){
HashSet result = new HashSet();
result.add(PropertyChangeSupport);
result.add(PatternObject);
result.add(Serialization);
result.add(ALBERTsSets);
result.add(REMOVEYOUMETHOD);
return result;
}
public FeatureProperty getFeature() {
return feature;
}
public Feature withIncludeClazz(String... value) {
getFeature().withInclude(value);
return this;
}
public Feature withExcludeClazz(String... value) {
getFeature().withExclude(value);
return this;
}
public Feature withExcludeClazz(Clazz... value) {
getFeature().withExclude(value);
return this;
}
public Feature withPath(String... value) {
getFeature().withPath(value);
return this;
}
public boolean match(Clazz clazz) {
return getFeature().match(clazz.getName(false));
}
public HashSet getPath() {
return getFeature().getPath();
}
public static void reset()
{
for (Feature f : Feature.values())
{
f.feature = new FeatureProperty();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy