Examples of EObject


Examples of erjang.EObject

   
    return barr.asBinary();
  }

  private static void collectList(EObject list, ECons iol, OutputStream barr) throws IOException {
    EObject tail;
    ECons cons;
    for (tail=iol; (cons = tail.testNonEmptyList()) != null; tail = cons.tail()) {
      EObject hd = cons.head();

      ESmall sm;
      EBinary bi;
      ECons co;
      if ((sm = hd.testSmall()) != null) {
        if (sm.value < 0 || sm.value > 255)
          throw ERT.badarg(list);
        barr.write(sm.value);
      } else if ((bi = hd.testBinary()) != null) {
        bi.writeTo(barr);
      } else if ((co = hd.testNonEmptyList()) != null) {
        collectList(list, co, barr);
      } else if (hd.isNil()) {
      } else {
        throw ERT.badarg(list);
      }
    }
View Full Code Here

Examples of erjang.EObject

    ETuple t;
    if ((t=tup.testTuple()) == null) { throw ERT.badarg(tup); }

    ESeq res = ERT.NIL;
    for (int i = t.arity(); i > 0; i--) {
      EObject e = t.elm(i);
      res = res.cons(e==null?ERT.NIL:e);
    }
   
    return res;
  }
View Full Code Here

Examples of erjang.EObject

    final EObject[] tmp = l1.toArray();

    // Step 2: Delete elements occurring l2 (but only once)
    int tmp_start = 0;
    for (ESeq cur = l2; !cur.isNil(); cur=cur.tail()) {
      EObject elm = cur.head();
      for (int i=tmp_start; i<tmp.length; i++) {
        if (tmp[i] != null && tmp[i].equalsExactly(elm)) {
          // Delete element
          tmp[i] = null;
View Full Code Here

Examples of erjang.EObject

       
        IMapEntry mape = (IMapEntry) map_seq.first();
        map_seq = map_seq.next();
       
        ETuple candidate = (ETuple) mape.getValue();
        EObject res;
        if ((res = matcher.match(candidate)) != null) {
          count += 1;
          vals = vals.cons(res);
        }
      }
View Full Code Here

Examples of erjang.EObject

  @BIF
  static EObject apply(EProc proc, EObject fun, EObject args) throws Pausable {
    ESeq a = args.testSeq();
    if (a==null) throw ERT.badarg(fun,args);
   
    EObject res;
    EFun f = fun.testFunction();
    if (f != null) {
      res = apply_last(proc, f, a);
    } else {
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject

    public static List getSpecializations(final Classifier classifier)
    {
        final List specials = new ArrayList();
        for (final TreeIterator iterator = EcoreUtil.getRootContainer(classifier).eAllContents(); iterator.hasNext();)
        {
            final EObject object = (EObject)iterator.next();
            if (object instanceof Generalization)
            {
                final Generalization generalization = (Generalization)object;
                if (generalization.getGeneral().equals(classifier))
                {
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject

    public Collection findByStereotype(final String name)
    {
        final ArrayList elements = new ArrayList();
        for (TreeIterator iterator = UmlUtilities.findModel(this.model).eAllContents(); iterator.hasNext();)
        {
            final EObject object = (EObject)iterator.next();
            if (object instanceof NamedElement)
            {
                final NamedElement element = (NamedElement)object;
                if (UmlUtilities.containsStereotype(
                        element,
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject

    {
        final ArrayList elements = new ArrayList();

        for (final Iterator iterator = UmlUtilities.findModel(this.model).eAllContents(); iterator.hasNext();)
        {
            final EObject object = (EObject)iterator.next();
            if (object instanceof NamedElement)
            {
                elements.add(object);
            }
        }
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject

*/
public class EMXProxyResolvingResourceSet extends ResourceSetImpl
{
    public EObject getEObject(URI uri, boolean loadOnDemand)
    {
        EObject possiblyResolvedObject = super.getEObject(uri, loadOnDemand);
        if (possiblyResolvedObject == null)
        {
            // if it is still a proxy, try this special fix for RSM:
            String uriString = uri.toString();
            int separatorIndex = uriString.lastIndexOf('?');
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject

     */
    protected void readModel(final String uri)
    {
        super.readModel(uri);
        // Just to be sure there is a valid "model" inside
        EObject modelPackage = (EObject) EcoreUtil.getObjectByType(model.getContents(), EcorePackage.eINSTANCE
                .getEObject());
        if (!(modelPackage instanceof Model))
        {
            throw new RepositoryFacadeException("Model '" + uri + "' is not a valid EMF UML2 model");
        }
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.