Examples of Copier


Examples of javassist.bytecode.AnnotationsAttribute.Copier

    /**
     * Copies this attribute and returns a new copy.
     */
    public AttributeInfo copy(ConstPool newCp, Map classnames) {
        Copier copier = new Copier(info, constPool, newCp, classnames);
        try {
            copier.parameters();
            return new ParameterAnnotationsAttribute(newCp, getName(),
                                                     copier.close());
        }
        catch (Exception e) {
            throw new RuntimeException(e.toString());
        }
    }
View Full Code Here

Examples of javassist.bytecode.AnnotationsAttribute.Copier

    /**
     * Copies this attribute and returns a new copy.
     */
    public AttributeInfo copy(ConstPool newCp, Map classnames) {
        Copier copier = new Copier(info, constPool, newCp, classnames);
        try {
            copier.parameters();
            return new ParameterAnnotationsAttribute(newCp, getName(),
                                                     copier.close());
        }
        catch (Exception e) {
            throw new RuntimeException(e.toString());
        }
    }
View Full Code Here

Examples of javassist.bytecode.AnnotationsAttribute.Copier

    /**
     * Copies this attribute and returns a new copy.
     */
    public AttributeInfo copy(ConstPool newCp, Map classnames) {
        Copier copier = new Copier(info, constPool, newCp, classnames);
        try {
            copier.parameters();
            return new ParameterAnnotationsAttribute(newCp, getName(),
                                                     copier.close());
        }
        catch (Exception e) {
            throw new RuntimeException(e.toString());
        }
    }
View Full Code Here

Examples of javassist.bytecode.AnnotationsAttribute.Copier

    /**
     * Copies this attribute and returns a new copy.
     */
    public AttributeInfo copy(ConstPool newCp, Map classnames) {
        Copier copier = new Copier(info, constPool, newCp, classnames);
        try {
            copier.parameters();
            return new ParameterAnnotationsAttribute(newCp, getName(),
                                                     copier.close());
        }
        catch (Exception e) {
            throw new RuntimeException(e.toString());
        }
    }
View Full Code Here

Examples of net.sourceforge.purrpackage.recording.Copier

      target.mkdirs();
      for (File x : source.listFiles()) {
        copyRecursively(x, new File(target, x.getName()));
      }
    } else {
      Copier c = new Copier();
      c.copyFile(source, target);
    }
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.util.EcoreUtil.Copier

*/
public class CopyHelperImpl implements CopyHelper
{
  public DataObject copyShallow(DataObject dataObject)
  {
    Copier copier = new Copier()
      {
        protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
        {
        }
      };
    EObject result = copier.copy((EObject)dataObject);
    copier.copyReferences();
    return (DataObject)result;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.util.EcoreUtil.Copier

*/
public class CopyHelperImpl implements CopyHelper
{
  public DataObject copyShallow(DataObject dataObject)
  {
    Copier copier = new Copier()
      {
        protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
        {
        }
      };
    EObject result = copier.copy((EObject)dataObject);
    copier.copyReferences();
    return (DataObject)result;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.util.EcoreUtil.Copier

*/
public class CopyHelperImpl implements CopyHelper
{
  public DataObject copyShallow(DataObject dataObject)
  {
    Copier copier = new Copier()
      {
        protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
        {
        }

        protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
            if(("ChangeSummaryType".equals(eAttribute.getEType().getName()) && "commonj.sdo".equals(eAttribute.getEType().getEPackage().getNsURI()))) {
                boolean isLogging = ((ChangeSummary)eObject.eGet(eAttribute)).isLogging();
                ChangeSummary destSum = (ChangeSummary)copyEObject.eGet(eAttribute);
                if(isLogging) {
                    if(!destSum.isLogging()) destSum.beginLogging();
                } else {
                    if(destSum.isLogging()) destSum.endLogging();
                }
            } else {
                super.copyAttribute(eAttribute, eObject, copyEObject);
            }
        }
      };
    EObject result = copier.copy((EObject)dataObject);
    copier.copyReferences();
    return (DataObject)result;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.util.EcoreUtil.Copier

    return (DataObject)result;
  }

  public DataObject copy(DataObject dataObject)
  {
    Copier copier = new Copier()
    {

        protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
            if(("ChangeSummaryType".equals(eAttribute.getEType().getName()) && "commonj.sdo".equals(eAttribute.getEType().getEPackage().getNsURI()))) {
                throw new UnsupportedOperationException("This will be implemented when change summary serialization/deserialization is in place");
            } else {
                super.copyAttribute(eAttribute, eObject, copyEObject);
            }
        }
    };
    EObject result = copier.copy((EObject)dataObject);
    copier.copyReferences();
    return (DataObject)result;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.util.EcoreUtil.Copier

    scope = targetScope;
  }
   
  public DataObject copyShallow(DataObject dataObject)
  {
    Copier copier = new CrossScopeCopier()
    {
      protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
      {
      }
      protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject)
      {
        if (eObject.eIsSet(eAttribute) && !FeatureMapUtil.isFeatureMap(eAttribute))
    {
      super.copyAttribute(eAttribute,eObject,copyEObject);
    }
    }
    };
    EObject result = copier.copy((EObject)dataObject);
    copier.copyReferences();
    return (DataObject)result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.