Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EStructuralFeature


    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to byte array");
  }

  public static Object getSetValue(Property property, byte[] value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }
View Full Code Here


    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to char");
  }

  public static Object getSetValue(Property property, char value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Character" || name == "char")
    {
      return new Character(value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to Date");
  }

  public static Object getSetValue(Property property, Date value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to double");
  }

  public static Object getSetValue(Property property, double value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Byte" || name == "byte")
    {
      return new Byte((byte)value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to float");
  }

  public static Object getSetValue(Property property, float value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Byte" || name == "byte")
    {
      return new Byte((byte)value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to int");
  }

  public static Object getSetValue(Property property, int value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Byte" || name == "byte")
    {
      return new Byte((byte)value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to long");
  }

  public static Object getSetValue(Property property, long value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Byte" || name == "byte")
    {
      return new Byte((byte)value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to short");
  }

  public static Object getSetValue(Property property, short value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    String name = eStructuralFeature.getEType().getInstanceClassName();
    if (name == "java.lang.Byte" || name == "byte")
    {
      return new Byte((byte)value);
    }
View Full Code Here

    throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to String");
  }

  public static Object getSetValue(Property property, String value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }
View Full Code Here

    EClass eClass = eObject.eClass();
    int openFeatureCount = featureID - eClass.getFeatureCount();
    Set openFeatureSet = new HashSet();
    for (int i = 0, count = eClass.getEAllStructuralFeatures().size(); i < count; ++i)
    {
      EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);
      if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        List features = (List)eObject.eGet(eStructuralFeature);
        for (int j = 0, size = features.size(); j < size; ++j)
        {
          FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j);
          EStructuralFeature entryFeature = entry.getEStructuralFeature();
          if (openFeatureSet.add(entryFeature))
          {
            if (--openFeatureCount < 0) return entryFeature;
          }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EStructuralFeature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.