Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 10800133090a66d543a28bcb2d33d902c58e9b76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package org.eclipse.papyrus.uml.modelexplorer.recipetest;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.Property;

/** get all without ports from a classifier */
public class GetAllWithoutPorts implements IJavaModelQuery<Classifier, Collection<Property>> {
	public Collection<Property> evaluate(final Classifier context, final ParameterValueList parameterValues){
	ArrayList<Property> result= new ArrayList<Property>();
	Iterator<Property> iter= context.getAllAttributes().iterator();
	while(iter.hasNext()){
		Property currentElement= iter.next();
		if( !(currentElement instanceof Port)){
			result.add(currentElement);
		}
	}
	return result;
	}
}

Back to the top