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

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


/**
 * Returns the value of the 'parent' container reference.
 *
 * It is bidirectional and its opposite is '{@link eu.mihosoft.vmf.vmftext.grammar.RuleClass#getCustomRuleAnnotations() customRuleAnnotations}'.
 *
 * 
 * 
 *
 * @return the value of the 'parent' container reference.
 * @see RuleAnnotation#setParent(eu.mihosoft.vmf.vmftext.grammar.RuleClass)
 */
 eu.mihosoft.vmf.vmftext.grammar.RuleClass getParent();

 /**
  * Sets the value of the 'parent' property.
  *
  * 
  * 
  *
  * @param parent the value to set
  * @see RuleAnnotation#getParent()
  */
  void setParent(eu.mihosoft.vmf.vmftext.grammar.RuleClass parent);



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




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

  public static interface Builder {

    /**
     * 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.RuleAnnotation RuleAnnotation}' instance.
   * @return a new '{@link eu.mihosoft.vmf.vmftext.grammar.RuleAnnotation RuleAnnotation}' instance
   */
  public RuleAnnotation build();

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

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

  } // end class Builder

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


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

    return __VMF__RuleAnnotation_Creator.newInstance();


  }

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

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

}

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

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

    static RuleAnnotation newInstance() {
        try {

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

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

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

                constructorMH = lookup.unreflectConstructor(constructor);
            }

            return (RuleAnnotation) constructorMH.invoke();

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

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

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

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

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

                builderConstructorMH = lookup.unreflectConstructor(builderConstructor);
            }

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

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy