eu.mihosoft.vmf.vmftext.grammar.GrammarModel Maven / Gradle / Ivy
The newest version!
package eu.mihosoft.vmf.vmftext.grammar;
// vmf imports
//import eu.mihosoft.vmf.runtime.core.*;
import eu.mihosoft.vcollections.*;
// property types imports
// interface
/**
* A representation of the model object {@code eu.mihosoft.vmf.vmftext.grammar.GrammarModel}.
*
*
*
*
*/
public interface GrammarModel extends eu.mihosoft.vmf.runtime.core.VObject, Cloneable, eu.mihosoft.vmf.runtime.core.Mutable {
/**
* Returns the value of the 'customRules' containment list.
*
* It is bidirectional and its opposite is '{@link CustomRule#getModel() model}'.
*
*
*
*
* @return the value of the 'customRules' containment list.
*/
eu.mihosoft.vcollections.VList getCustomRules();
/**
* Returns the value of the 'grammarName' property.
*
*
*
*
* @return the value of the 'grammarName' property.
* @see GrammarModel#setGrammarName(java.lang.String)
*/
java.lang.String getGrammarName();
/**
* Sets the value of the 'grammarName' property.
*
*
*
*
* @param grammarName the value to set
* @see GrammarModel#getGrammarName()
*/
void setGrammarName(java.lang.String grammarName);
/**
* Returns the value of the 'packageName' property.
*
*
*
*
* @return the value of the 'packageName' property.
* @see GrammarModel#setPackageName(java.lang.String)
*/
java.lang.String getPackageName();
/**
* Sets the value of the 'packageName' property.
*
*
*
*
* @param packageName the value to set
* @see GrammarModel#getPackageName()
*/
void setPackageName(java.lang.String packageName);
/**
* Returns the value of the 'ruleClasses' containment list.
*
* It is bidirectional and its opposite is '{@link RuleClass#getModel() model}'.
*
*
*
*
* @return the value of the 'ruleClasses' containment list.
*/
eu.mihosoft.vcollections.VList getRuleClasses();
/**
* Returns the value of the 'typeMappings' containment reference.
*
* It is bidirectional and its opposite is '{@link eu.mihosoft.vmf.vmftext.grammar.TypeMappings#getModel() model}'.
*
*
*
*
* @return the value of the 'typeMappings' containment reference.
* @see GrammarModel#setTypeMappings(eu.mihosoft.vmf.vmftext.grammar.TypeMappings)
*/
eu.mihosoft.vmf.vmftext.grammar.TypeMappings getTypeMappings();
/**
* Sets the value of the 'typeMappings' property.
*
*
*
*
* @param typeMappings the value to set
* @see GrammarModel#getTypeMappings()
*/
void setTypeMappings(eu.mihosoft.vmf.vmftext.grammar.TypeMappings typeMappings);
// --------------------------------------------------------------------
// --- declaration of delegation methods
// --------------------------------------------------------------------
public boolean hasRootClass();
public java.util.Optional propertyByName(java.lang.String arg0, java.lang.String arg1);
public eu.mihosoft.vmf.vmftext.grammar.RuleClass rootClass();
public java.util.Optional ruleClassByName(java.lang.String arg0);
// --------------------------------------------------------------------
// --- Builder methods
// --------------------------------------------------------------------
public static interface Builder {
/**
* Sets the 'customRules' property of this builder.
* @param customRules value to set
* @return this builder
*/
public Builder withCustomRules(eu.mihosoft.vcollections.VList customRules);
/**
* Sets the 'grammarName' property of this builder.
* @param grammarName value to set
* @return this builder
*/
public Builder withGrammarName(java.lang.String grammarName);
/**
* Sets the 'packageName' property of this builder.
* @param packageName value to set
* @return this builder
*/
public Builder withPackageName(java.lang.String packageName);
/**
* Sets the 'ruleClasses' property of this builder.
* @param ruleClasses value to set
* @return this builder
*/
public Builder withRuleClasses(eu.mihosoft.vcollections.VList ruleClasses);
/**
* Sets the 'typeMappings' property of this builder.
* @param typeMappings value to set
* @return this builder
*/
public Builder withTypeMappings(eu.mihosoft.vmf.vmftext.grammar.TypeMappings typeMappings);
/**
* Builds a new '{@link eu.mihosoft.vmf.vmftext.grammar.GrammarModel GrammarModel}' instance.
* @return a new '{@link eu.mihosoft.vmf.vmftext.grammar.GrammarModel GrammarModel}' instance
*/
public GrammarModel build();
/**
* Defines whether to append collections rather than replacing them in the
* {@link #applyFrom(GrammarModel)} and {@link #applyTo(GrammarModel)} methods.
* @param value that indicates whether to append collections
* @return this builder
*/
public Builder appendCollections(boolean value);
/**
* Applies all properties from the specified object to this builder.
* @param o object to apply properties from
* @return this builder
* @see #applyTo(GrammarModel)
*/
public Builder applyFrom(GrammarModel o);
/**
* Applies all properties from this builder to the specified object.
* @param o object to apply properties to
* @return this builder
* @see #applyFrom(GrammarModel)
*/
public Builder applyTo(GrammarModel o);
} // end class Builder
/**
* Returns a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.GrammarModel GrammarModel}' instance.
* @return a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.GrammarModel GrammarModel}' instance
*/
static Builder newBuilder() {
return __VMF__GrammarModel_Creator.newBuilderInstance();
} // end newBuilder()
/**
* Creates a new instance of '{@link GrammarModel GrammarModel}'
* @return a new instance of '{@link GrammarModel GrammarModel}'
*/
static GrammarModel newInstance() {
return __VMF__GrammarModel_Creator.newInstance();
}
/**
* Returns a read-only wrapper of '{@link GrammarModel GrammarModel}'
* @return a read-only wrapper of '{@link GrammarModel GrammarModel}'
*/
ReadOnlyGrammarModel asReadOnly();
/**
* Returns a deep clone of this object.
* @return a deep clone of this object
*/
@Override
GrammarModel clone() /*throws CloneNotSupportedException*/;
}
/*
* Creates instances of type {@codeeu.mihosoft.vmf.vmftext.grammar.impl.GrammarModelImpl}. Method handles
* and class objects are lazily initialized and cached since repetitive and high frequent usage is likely.
*
* This class is used to gain efficient avvess to private classes from the impl package.
*/
class __VMF__GrammarModel_Creator {
static Class> cls;
static java.lang.reflect.Constructor constructor;
static java.lang.invoke.MethodHandles.Lookup lookup;
static java.lang.invoke.MethodHandle constructorMH;
static GrammarModel newInstance() {
try {
if(cls==null) {
cls = Class.forName("eu.mihosoft.vmf.vmftext.grammar.impl.GrammarModelImpl");
if(lookup==null) { lookup = java.lang.invoke.MethodHandles.lookup(); }
constructor = cls.getConstructor();
constructor.setAccessible(true);
constructorMH = lookup.unreflectConstructor(constructor);
}
return (GrammarModel) constructorMH.invoke();
} catch (Throwable tr) {
throw new RuntimeException("Cannot instantiate \"eu.mihosoft.vmf.vmftext.grammar.impl.GrammarModelImpl\"", tr);
}
}
static Class> builderCls;
static java.lang.reflect.Constructor builderConstructor;
static java.lang.invoke.MethodHandle builderConstructorMH;
static GrammarModel.Builder newBuilderInstance() {
try {
if(builderCls==null) {
builderCls = Class.forName("eu.mihosoft.vmf.vmftext.grammar.impl.GrammarModelImpl$BuilderImpl");
if(lookup==null) { lookup = java.lang.invoke.MethodHandles.lookup(); }
builderConstructor = builderCls.getConstructor();
builderConstructor.setAccessible(true);
builderConstructorMH = lookup.unreflectConstructor(builderConstructor);
}
return (GrammarModel.Builder) builderConstructorMH.invoke();
} catch (Throwable tr) {
throw new RuntimeException("Cannot instantiate \"eu.mihosoft.vmf.vmftext.grammar.impl.GrammarModelImpl\"", tr);
}
}
}