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

org.eclipse.emf.codegen.jet.JETValueItem Maven / Gradle / Ivy

/**
 * Copyright (c) 2019 Eclipse contributors and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v20.html
 */
package org.eclipse.emf.codegen.jet;


import java.util.Collections;
import java.util.List;


/**
 * @since 2.19
 */
public class JETValueItem extends JETSubItem
{
  private final String value;

  private final List elements;

  JETValueItem(JETMark start, JETMark stop, String value, List elements)
  {
    super(start, stop);
    this.value = value;
    this.elements = elements;
    for (JETSubItem child : elements)
    {
      child.setParent(this);
    }
  }

  public String getValue()
  {
    return value;
  }

  @Override
  @SuppressWarnings("unchecked")
  public List getChildren()
  {
    return (List)(List)Collections.unmodifiableList(elements);
  }

  public List getElements()
  {
    return elements;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy