eu.mihosoft.vmf.vmftext.grammar.CodeRange 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 immutable model object {@code eu.mihosoft.vmf.vmftext.grammar.CodeRange}.
*
*
*
*
*/
public interface CodeRange extends eu.mihosoft.vmf.runtime.core.VObject, Cloneable, eu.mihosoft.vmf.runtime.core.Immutable {
/**
* Returns the value of the 'length' property.
*
*
*
*
* @return the value of the 'length' property.
*/
int getLength();
/**
* Returns the value of the 'start' property.
*
*
*
*
* @return the value of the 'start' property.
*/
eu.mihosoft.vmf.vmftext.grammar.CodeLocation getStart();
/**
* Returns the value of the 'stop' property.
*
*
*
*
* @return the value of the 'stop' property.
*/
eu.mihosoft.vmf.vmftext.grammar.CodeLocation getStop();
// --------------------------------------------------------------------
// --- Builder methods
// --------------------------------------------------------------------
public static interface Builder {
/**
* Sets the 'length' property of this builder.
* @param length value to set
* @return this builder
*/
public Builder withLength(int length);
/**
* Sets the 'start' property of this builder.
* @param start value to set
* @return this builder
*/
public Builder withStart(eu.mihosoft.vmf.vmftext.grammar.CodeLocation start);
/**
* Sets the 'stop' property of this builder.
* @param stop value to set
* @return this builder
*/
public Builder withStop(eu.mihosoft.vmf.vmftext.grammar.CodeLocation stop);
/**
* Builds a new '{@link eu.mihosoft.vmf.vmftext.grammar.CodeRange CodeRange}' instance.
* @return a new '{@link eu.mihosoft.vmf.vmftext.grammar.CodeRange CodeRange}' instance
*/
public CodeRange build();
} // end class Builder
/**
* Returns a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.CodeRange CodeRange}' instance.
* @return a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.CodeRange CodeRange}' instance
*/
static Builder newBuilder() {
return __VMF__CodeRange_Creator.newBuilderInstance();
} // end newBuilder()
/**
* Returns a read-only wrapper of '{@link CodeRange CodeRange}'. Since this model object is immutable
this method does not perform any conversion and returns this object in unmodified form.
* @return a read-only wrapper of '{@link CodeRange CodeRange}'
*/
CodeRange asReadOnly();
/**
* Returns a deep clone of this object.
* @return a deep clone of this object
*/
@Override
CodeRange clone() /*throws CloneNotSupportedException*/;
}
class __VMF__CodeRange_Creator {
static Class> builderCls;
static java.lang.invoke.MethodHandles.Lookup lookup;
static java.lang.reflect.Constructor builderConstructor;
static java.lang.invoke.MethodHandle builderConstructorMH;
static CodeRange.Builder newBuilderInstance() {
try {
if(builderCls==null) {
builderCls = Class.forName("eu.mihosoft.vmf.vmftext.grammar.impl.CodeRangeImpl$BuilderImpl");
if(lookup==null) { lookup = java.lang.invoke.MethodHandles.lookup(); }
builderConstructor = builderCls.getConstructor();
builderConstructor.setAccessible(true);
builderConstructorMH = lookup.unreflectConstructor(builderConstructor);
}
return (CodeRange.Builder) builderConstructorMH.invoke();
} catch (Throwable tr) {
throw new RuntimeException("Cannot instantiate \"eu.mihosoft.vmf.vmftext.grammar.impl.CodeRangeImpl\"", tr);
}
}
}