static Collection createEmptyCollection(EStructuralFeature feature) { Class clazz = feature.getEType().getInstanceClass(); if (EList.class.isAssignableFrom(clazz)) { return new BasicEList(); } if (List.class.isAssignableFrom(clazz)) { return new ArrayList(); } if (Set.class.isAssignableFrom(clazz)) { return new HashSet(); } throw new IllegalArgumentException("Unable to create collection for " + clazz); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public EList<String> getFieldNames() { BasicEList<String> result = new BasicEList<String>(); result.addAll(JsonMetadata.INSTANCE.getJsonFeatures(eClass()).keySet()); result.addAll(getUnmatched().keySet()); return result; }
/** * Creates an empty mutable {@link BasicEList>}. * @return an empty mutable {@link BasicEList>}. * @since 2.9 */ public static <T> BasicEList<T> newBasicEList() { return new BasicEList<T>(); }
public EList getSubstitutions() { if (substitutions == null) { substitutions = new BasicEList(); } return substitutions; }
public XMLString(int lineWidth, String temporaryFileName) { super(temporaryFileName); this.lineWidth = lineWidth; elementNames = new BasicEList<String>(); mixed = new BasicEList<Boolean>(); indents = new BasicEList<String>(); indents.add(""); }
public XMLString(int lineWidth, String temporaryFileName) { super(temporaryFileName); this.lineWidth = lineWidth; elementNames = new BasicEList<String>(); mixed = new BasicEList<Boolean>(); indents = new BasicEList<String>(); indents.add(""); }
BasicEList<Object> list = new BasicEList<Object>(listSize); for (int i = 0; i < listSize; i++) { Object reference = readPrimitiveValue(feature.getEType(), buffer, query);
if (feature.isMany()) { if (nextToken == JsonToken.START_ARRAY) { EList values = new BasicEList(); while (jp.nextToken() != JsonToken.END_ARRAY) { values.add(parseValueForDataType(jp, dataType)); EList values = new BasicEList(); while (jp.nextToken() != JsonToken.END_ARRAY) { values.add(from(jp, eRef.getEReferenceType()));
protected EList<Object> getList(Entry entry) { @SuppressWarnings("unchecked") EList<Object> result = (EList<Object>)map.get(entry); if (result == null) { result = new BasicEList<Object>(); map.put(entry, result); } return result; }
protected EList<Object> getList(Entry entry) { @SuppressWarnings("unchecked") EList<Object> result = (EList<Object>)map.get(entry); if (result == null) { result = new BasicEList<Object>(); map.put(entry, result); } return result; }
public EList<String> getValidFacetsForUnion() { if (validFacetsForUnion == null) { validFacetsForUnion = new BasicEList<String>(); validFacetsForUnion.add("enumeration"); validFacetsForUnion.add("pattern"); } return validFacetsForUnion; }
public static EList<Entity> getReferencedEntities(FunctionBlock fb) { EList<Entity> entities = new BasicEList<Entity>(); for (Type type : getReferencedTypes(fb)) { if (type instanceof Entity) { entities.add((Entity) type); } } return entities; }
public EList eContents() { EList results = new BasicEList(); results.addAll(getParametersGen()); //FB return results; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public EList<String> getTypes() { EList<String> types = new BasicEList<String>(); for (EStructuralFeature feature: eClass().getEStructuralFeatures()) { types.add(feature.getName()); } return types; }
public EList<Style> getStyles() { EList<Style> styles = new BasicEList<Style>(); StyleProperty styleProperty = getStyleProperty(); if (null != styleProperty) { styles = styleProperty.getStyles(); } return styles; }
public static EList<Type> getReferencedTypes(Entity entity) { EList<Type> types = new BasicEList<Type>(); for (Property property : entity.getProperties()) { types.addAll(getReferencedTypes(property)); } types.add(entity.getSuperType()); return types; }
protected EList<XExpression> getActualArguments(XExpression syntacticReceiver, XExpression syntacticArgument) { if (syntacticArgument != null) { return getActualArguments(syntacticReceiver, new BasicEList<XExpression>(Collections.singletonList(syntacticArgument))); } return getActualArguments(syntacticReceiver, ECollections.<XExpression>emptyEList()); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ @Override public EList<Permission> getAllPermissions() { EList<Permission> allPermissions = new BasicEList<Permission>(getPermissions()); for(Role role : getRoles()) allPermissions.addAll(role.getAllPermissions()); return allPermissions; }
@Override public EList<XExpression> getExplicitArguments() { BasicEList<XExpression> result = new BasicEList<XExpression>(); if (getOperand() != null) { result.add(getOperand()); } return result; }
@Deprecated @Override public EList<XExpression> getExplicitArguments() { BasicEList<XExpression> result = new BasicEList<XExpression>(); if (getAssignable()!=null) result.add(getAssignable()); if (getValue()!=null) result.add(getValue()); return result; }