Tabnine Logo
EcoreUtil$Copier.getTarget
Code IndexAdd Tabnine to your IDE (free)

How to use
getTarget
method
in
org.eclipse.emf.ecore.util.EcoreUtil$Copier

Best Java code snippets using org.eclipse.emf.ecore.util.EcoreUtil$Copier.getTarget (Showing top 14 results out of 315)

origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Returns the target class used to create a copy instance for the given instance object.
 * @param eObject the object to be copied.
 * @return the target class used to create a copy instance.
 * @since 2.10
 */
protected EClass getTarget(EObject eObject)
{
 return getTarget(eObject.eClass());
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Returns the target class used to create a copy instance for the given instance object.
 * @param eObject the object to be copied.
 * @return the target class used to create a copy instance.
 * @since 2.10
 */
protected EClass getTarget(EObject eObject)
{
 return getTarget(eObject.eClass());
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

FeatureMap copyFeatureMap = (FeatureMap)getTarget(eStructuralFeature, eObject, copyEObject);
if (copyFeatureMap != null)
   copyFeatureMap.add(getTarget(featureMap.getEStructuralFeature(k)), featureMap.getValue(k));
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
if (setting != null)
origin: org.eclipse.emf/org.eclipse.emf.ecore

FeatureMap copyFeatureMap = (FeatureMap)getTarget(eStructuralFeature, eObject, copyEObject);
if (copyFeatureMap != null)
   copyFeatureMap.add(getTarget(featureMap.getEStructuralFeature(k)), featureMap.getValue(k));
origin: org.eclipse.emf/org.eclipse.emf.ecore

EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
if (setting != null)
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Called to handle the copying of an attribute;
 * this adds a list of values or sets a single value as appropriate for the multiplicity.
 * @param eAttribute the attribute to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eAttribute))
 {
  if (FeatureMapUtil.isFeatureMap(eAttribute))
  {
   FeatureMap featureMap = (FeatureMap)eObject.eGet(eAttribute);
   copyFeatureMap(featureMap);
  }
  else
  {
   EStructuralFeature.Setting setting = getTarget(eAttribute, eObject, copyEObject);
   if (setting != null)
   {
    copyAttributeValue(eAttribute, eObject, eObject.eGet(eAttribute), setting);
   }
  }
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Called to handle the copying of a containment feature;
 * this adds a list of copies or sets a single copy as appropriate for the multiplicity.
 * @param eReference the feature to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eReference))
 {
  EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
  if (setting != null)
  {
   Object value = eObject.eGet(eReference);
   if (eReference.isMany())
   {
    @SuppressWarnings("unchecked")
    List<EObject> target = (List<EObject>)value;
    setting.set(copyAll(target));
   }
   else
   {
    setting.set(copy((EObject)value));
   }
  }
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Called to handle the copying of an attribute;
 * this adds a list of values or sets a single value as appropriate for the multiplicity.
 * @param eAttribute the attribute to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eAttribute))
 {
  if (FeatureMapUtil.isFeatureMap(eAttribute))
  {
   FeatureMap featureMap = (FeatureMap)eObject.eGet(eAttribute);
   copyFeatureMap(featureMap);
  }
  else
  {
   EStructuralFeature.Setting setting = getTarget(eAttribute, eObject, copyEObject);
   if (setting != null)
   {
    copyAttributeValue(eAttribute, eObject, eObject.eGet(eAttribute), setting);
   }
  }
 }
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Called to handle the copying of a containment feature;
 * this adds a list of copies or sets a single copy as appropriate for the multiplicity.
 * @param eReference the feature to copy.
 * @param eObject the object from which to copy.
 * @param copyEObject the object to copy to.
 */
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 if (eObject.eIsSet(eReference))
 {
  EStructuralFeature.Setting setting = getTarget(eReference, eObject, copyEObject);
  if (setting != null)
  {
   Object value = eObject.eGet(eReference);
   if (eReference.isMany())
   {
    @SuppressWarnings("unchecked")
    List<EObject> target = (List<EObject>)value;
    setting.set(copyAll(target));
   }
   else
   {
    setting.set(copy((EObject)value));
   }
  }
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Returns a setting for the feature and copy instance to be populated with the original object's source feature's value.
 * @param eStructuralFeature the source feature.
 * @return the target feature used to populate a copy instance.
 * @see #getTarget(EStructuralFeature)
 * @see #getTarget(EObject)
 * @since 2.10
 */
protected EStructuralFeature.Setting getTarget(EStructuralFeature eStructuralFeature, EObject eObject, EObject copyEObject)
{
 EStructuralFeature targetEStructuralFeature = getTarget(eStructuralFeature);
 return targetEStructuralFeature == null ? null : ((InternalEObject)copyEObject).eSetting(targetEStructuralFeature);
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Returns a setting for the feature and copy instance to be populated with the original object's source feature's value.
 * @param eStructuralFeature the source feature.
 * @return the target feature used to populate a copy instance.
 * @see #getTarget(EStructuralFeature)
 * @see #getTarget(EObject)
 * @since 2.10
 */
protected EStructuralFeature.Setting getTarget(EStructuralFeature eStructuralFeature, EObject eObject, EObject copyEObject)
{
 EStructuralFeature targetEStructuralFeature = getTarget(eStructuralFeature);
 return targetEStructuralFeature == null ? null : ((InternalEObject)copyEObject).eSetting(targetEStructuralFeature);
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Returns a new instance of the object's target class.
 * @param eObject the object to copy.
 * @return a new instance of the target class.
 * @see #getTarget(EObject)
 * @see EcoreUtil#create(EClass)
 */
protected EObject createCopy(EObject eObject)
{
 EClass eClass = getTarget(eObject);
 return eClass == null ? null : create(eClass);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Returns a new instance of the object's target class.
 * @param eObject the object to copy.
 * @return a new instance of the target class.
 * @see #getTarget(EObject)
 * @see EcoreUtil#create(EClass)
 */
protected EObject createCopy(EObject eObject)
{
 EClass eClass = getTarget(eObject);
 return eClass == null ? null : create(eClass);
}
org.eclipse.emf.ecore.utilEcoreUtil$CopiergetTarget

Javadoc

Returns the target class used to create a copy instance for objects of the given source class.

Popular methods of EcoreUtil$Copier

  • copyReferences
    Hooks up cross references; it delegates to #copyReference.
  • copy
    Returns a copy of the given eObject.
  • copyAll
    Returns a collection containing a copy of each EObject in the given collection.
  • get
  • <init>
    Creates an instance that resolves proxies or not and uses non-copied references or not as specified.
  • copyAttribute
    Called to handle the copying of an attribute; this adds a list of values or sets a single value as a
  • entrySet
  • copyContainment
    Called to handle the copying of a containment feature; this adds a list of copies or sets a single c
  • copyReference
    Called to handle the copying of a cross reference; this adds values or sets a single value as approp
  • createCopy
    Returns a new instance of the object's target class.
  • copyAttributeValue
    Called to handle copying of an attribute's value to the target setting.
  • copyFeatureMap
    Call to handle copying the contained objects within a feature map.
  • copyAttributeValue,
  • copyFeatureMap,
  • copyProxyURI,
  • put

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now