All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.mihosoft.vmf.vmftext.grammar.UPElement Maven / Gradle / Ivy


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.UPElement}.
 *
 * 
 * 
 *
 */
public interface UPElement extends eu.mihosoft.vmf.runtime.core.VObject, WithText, Cloneable, eu.mihosoft.vmf.runtime.core.Mutable {


   /**
   * Returns the value of the 'lexerRule' property.
   *
   * 
   * 
   *
   * @return the value of the 'lexerRule' property.
   * @see UPElement#setLexerRule(boolean)
   */
 boolean isLexerRule();

 /**
  * Sets the value of the 'lexerRule' property.
  *
  * 
  * 
  *
  * @param lexerRule the value to set
  * @see UPElement#isLexerRule()
  */
  void setLexerRule(boolean lexerRule);



   /**
   * Returns the value of the 'listType' property.
   *
   * 
   * 
   *
   * @return the value of the 'listType' property.
   * @see UPElement#setListType(boolean)
   */
 boolean isListType();

 /**
  * Sets the value of the 'listType' property.
  *
  * 
  * 
  *
  * @param listType the value to set
  * @see UPElement#isListType()
  */
  void setListType(boolean listType);



   /**
   * Returns the value of the 'negated' property.
   *
   * 
   * 
   *
   * @return the value of the 'negated' property.
   * @see UPElement#setNegated(boolean)
   */
 boolean isNegated();

 /**
  * Sets the value of the 'negated' property.
  *
  * 
  * 
  *
  * @param negated the value to set
  * @see UPElement#isNegated()
  */
  void setNegated(boolean negated);



/**
 * Returns the value of the 'parentAlt' container reference.
 *
 * It is bidirectional and its opposite is '{@link eu.mihosoft.vmf.vmftext.grammar.AlternativeBase#getElements() elements}'.
 *
 * 
 * 
 *
 * @return the value of the 'parentAlt' container reference.
 * @see UPElement#setParentAlt(eu.mihosoft.vmf.vmftext.grammar.AlternativeBase)
 */
 eu.mihosoft.vmf.vmftext.grammar.AlternativeBase getParentAlt();

 /**
  * Sets the value of the 'parentAlt' property.
  *
  * 
  * 
  *
  * @param parentAlt the value to set
  * @see UPElement#getParentAlt()
  */
  void setParentAlt(eu.mihosoft.vmf.vmftext.grammar.AlternativeBase parentAlt);



   /**
   * Returns the value of the 'parserRule' property.
   *
   * 
   * 
   *
   * @return the value of the 'parserRule' property.
   * @see UPElement#setParserRule(boolean)
   */
 boolean isParserRule();

 /**
  * Sets the value of the 'parserRule' property.
  *
  * 
  * 
  *
  * @param parserRule the value to set
  * @see UPElement#isParserRule()
  */
  void setParserRule(boolean parserRule);



   /**
   * Returns the value of the 'ruleName' property.
   *
   * 
   * 
   *
   * @return the value of the 'ruleName' property.
   * @see UPElement#setRuleName(java.lang.String)
   */
 java.lang.String getRuleName();

 /**
  * Sets the value of the 'ruleName' property.
  *
  * 
  * 
  *
  * @param ruleName the value to set
  * @see UPElement#getRuleName()
  */
  void setRuleName(java.lang.String ruleName);



   /**
   * Returns the value of the 'terminal' property.
   *
   * 
   * 
   *
   * @return the value of the 'terminal' property.
   * @see UPElement#setTerminal(boolean)
   */
 boolean isTerminal();

 /**
  * Sets the value of the 'terminal' property.
  *
  * 
  * 
  *
  * @param terminal the value to set
  * @see UPElement#isTerminal()
  */
  void setTerminal(boolean terminal);



// --------------------------------------------------------------------
// --- declaration of delegation methods
// --------------------------------------------------------------------

  public boolean ebnfNonGreedy();
  public boolean ebnfOne();
  public boolean ebnfOneMany();
  public boolean ebnfOptional();
  public boolean ebnfZeroMany();
  public boolean namedElement();
  public boolean namedSubRuleElement();
  public boolean unnamedSubRuleElement();



// --------------------------------------------------------------------
// --- Builder methods
// --------------------------------------------------------------------

  public static interface Builder {

    /**
     * Sets the 'lexerRule' property of this builder.
     * @param lexerRule value to set
     * @return this builder
     */
    public Builder withLexerRule(boolean lexerRule);
    /**
     * Sets the 'listType' property of this builder.
     * @param listType value to set
     * @return this builder
     */
    public Builder withListType(boolean listType);
    /**
     * Sets the 'negated' property of this builder.
     * @param negated value to set
     * @return this builder
     */
    public Builder withNegated(boolean negated);
    /**
     * Sets the 'parserRule' property of this builder.
     * @param parserRule value to set
     * @return this builder
     */
    public Builder withParserRule(boolean parserRule);
    /**
     * Sets the 'ruleName' property of this builder.
     * @param ruleName value to set
     * @return this builder
     */
    public Builder withRuleName(java.lang.String ruleName);
    /**
     * Sets the 'terminal' property of this builder.
     * @param terminal value to set
     * @return this builder
     */
    public Builder withTerminal(boolean terminal);
    /**
     * Sets the 'text' property of this builder.
     * @param text value to set
     * @return this builder
     */
    public Builder withText(java.lang.String text);

  /**
   * Builds a new '{@link eu.mihosoft.vmf.vmftext.grammar.UPElement UPElement}' instance.
   * @return a new '{@link eu.mihosoft.vmf.vmftext.grammar.UPElement UPElement}' instance
   */
  public UPElement build();

    /**
     * Defines whether to append collections rather than replacing them in the
     * {@link #applyFrom(UPElement)} and {@link #applyTo(UPElement)} 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(UPElement)
     */
    public Builder applyFrom(UPElement o);

    /**
     * Applies all properties from this builder to the specified object.
     * @param o object to apply properties to
     * @return this builder
     * @see #applyFrom(UPElement)
     */
    public Builder applyTo(UPElement o);

  } // end class Builder

  /**
   * Returns a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.UPElement UPElement}' instance.
   * @return a new builder for creating a '{@link eu.mihosoft.vmf.vmftext.grammar.UPElement UPElement}' instance
   */
  static Builder newBuilder() {
    return __VMF__UPElement_Creator.newBuilderInstance();
  } // end newBuilder()


  /**
   * Creates a new instance of '{@link UPElement UPElement}'
   * @return a new instance of '{@link UPElement UPElement}'
   */
  static UPElement newInstance() {

    return __VMF__UPElement_Creator.newInstance();


  }

  /**
   * Returns a read-only wrapper of '{@link UPElement UPElement}'
   * @return a read-only wrapper of '{@link UPElement UPElement}'
   */
  ReadOnlyUPElement asReadOnly();

  /**
   * Returns a deep clone of this object.
   * @return a deep clone of this object
   */
  @Override
  UPElement clone() /*throws CloneNotSupportedException*/;

}

/*
 *  Creates instances of type {@codeeu.mihosoft.vmf.vmftext.grammar.impl.UPElementImpl}. 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__UPElement_Creator {

    static Class cls;
    static java.lang.reflect.Constructor constructor;
    static java.lang.invoke.MethodHandles.Lookup lookup;
    static java.lang.invoke.MethodHandle constructorMH;

    static UPElement newInstance() {
        try {

            if(cls==null) {
                cls = Class.forName("eu.mihosoft.vmf.vmftext.grammar.impl.UPElementImpl");

                if(lookup==null) { lookup = java.lang.invoke.MethodHandles.lookup(); }

                constructor = cls.getConstructor();
                constructor.setAccessible(true);

                constructorMH = lookup.unreflectConstructor(constructor);
            }

            return (UPElement) constructorMH.invoke();

        } catch (Throwable tr) {
            throw new RuntimeException("Cannot instantiate \"eu.mihosoft.vmf.vmftext.grammar.impl.UPElementImpl\"", tr);
        }
    }

    static Class builderCls;
    static java.lang.reflect.Constructor builderConstructor;
    static java.lang.invoke.MethodHandle builderConstructorMH;

    static UPElement.Builder newBuilderInstance() {
        try {
            if(builderCls==null) {
                builderCls = Class.forName("eu.mihosoft.vmf.vmftext.grammar.impl.UPElementImpl$BuilderImpl");

                if(lookup==null) { lookup = java.lang.invoke.MethodHandles.lookup(); }

                builderConstructor = builderCls.getConstructor();
                builderConstructor.setAccessible(true);

                builderConstructorMH = lookup.unreflectConstructor(builderConstructor);
            }

            return (UPElement.Builder) builderConstructorMH.invoke();

        } catch (Throwable tr) {
            throw new RuntimeException("Cannot instantiate \"eu.mihosoft.vmf.vmftext.grammar.impl.UPElementImpl\"", tr);
        }
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy