@Override public Iterator<JvmConstructor> iterator() { return castedType.getDeclaredConstructors().iterator(); } };
public Iterator<JvmConstructor> iterator() { return castedType.getDeclaredConstructors().iterator(); } };
protected List<IEObjectDescription> createConstructorDescriptions(QualifiedName name, JvmGenericType type, boolean superType) { Iterable<JvmConstructor> constructors = type.getDeclaredConstructors(); List<IEObjectDescription> result = Lists.newArrayListWithCapacity(3); for(JvmConstructor constructor: constructors) { addToList(createDescription(name, constructor, superType), result); } return result; }
protected List<IResolvedConstructor> computeDeclaredConstructors() { JvmType rawType = getRawType(); if (!(rawType instanceof JvmGenericType)) { return Collections.emptyList(); } List<IResolvedConstructor> result = Lists.newArrayList(); for(JvmConstructor constructor: ((JvmGenericType)rawType).getDeclaredConstructors()) { result.add(new ResolvedConstructor(constructor, getType())); } return Collections.unmodifiableList(result); }
public boolean containsConstructorAcceptingPluginParameter(final EObject context, final JvmTypeReference typeRef) { final JvmType type = typeRef.getType(); if ((type instanceof JvmGenericType)) { final Function1<JvmConstructor, Boolean> _function = new Function1<JvmConstructor, Boolean>() { @Override public Boolean apply(final JvmConstructor it) { return Boolean.valueOf(((it.getParameters().size() == 1) && EmfParsleyDslGuiceModuleHelper.this._emfParsleyDslTypeSystem.isConformant(context, AbstractUIPlugin.class, IterableExtensions.<JvmFormalParameter>head(it.getParameters()).getParameterType()))); } }; return IterableExtensions.<JvmConstructor>exists(((JvmGenericType)type).getDeclaredConstructors(), _function); } return false; }
Iterable<JvmConstructor> declaredConstructors = type.getDeclaredConstructors(); if (Iterables.size(declaredConstructors) == 1 && jvmTypeExtensions.isSingleSyntheticDefaultConstructor(declaredConstructors.iterator().next())) { finalFields.removeAll(initializedFields);
protected void addFeatureDescriptions(IEObjectDescription typeDescription, List<IEObjectDescription> result) { EObject proxy = getResolvedProxy(typeDescription); if (!proxy.eIsProxy() && proxy instanceof JvmGenericType) { JvmGenericType type = (JvmGenericType) proxy; if (!type.isInterface()) { for(JvmConstructor constructor: type.getDeclaredConstructors()) { boolean visible = visibilityHelper.isVisible(constructor); ConstructorDescription constructorDescription = createConstructorDescription(typeDescription, constructor, visible); result.add(constructorDescription); } } else if (!strict) { result.add(new SimpleIdentifiableElementDescription(typeDescription)); } } else if (proxy instanceof JvmType) { if (!strict) result.add(new SimpleIdentifiableElementDescription(typeDescription)); } }
JvmType superType = inferredType.getExtendedClass().getType(); if(superType instanceof JvmGenericType) { Iterable<JvmConstructor> superConstructors = ((JvmGenericType) superType).getDeclaredConstructors(); for(JvmConstructor superConstructor: superConstructors) { if(superConstructor.getParameters().isEmpty())
protected void completeJvmGenericType(JvmGenericType element) { // if no super type add Object ensureSuperTypeObject(element); addAnnotations(element); if (!element.isInterface()) { // if no constructors have been added, add a default constructor if (isEmpty(element.getDeclaredConstructors())) { JvmConstructor constructor = TypesFactory.eINSTANCE.createJvmConstructor(); constructor.setSimpleName(element.getSimpleName()); constructor.setVisibility(JvmVisibility.PUBLIC); typeExtensions.setSynthetic(constructor, true); EObject primarySourceElement = associations.getPrimarySourceElement(element); if (primarySourceElement != null) { associator.associate(primarySourceElement, constructor); } element.getMembers().add(constructor); } } }
if (supertype instanceof JvmGenericType) { final JvmGenericType jvmSuperElement = (JvmGenericType) supertype; for (final JvmConstructor superConstructor : jvmSuperElement.getDeclaredConstructors()) { final ActionParameterTypes sig = this.sarlActionSignatures.createParameterTypesFromJvmModel( superConstructor.isVarArgs(), superConstructor.getParameters());
for (final JvmConstructor cons : parentType.getDeclaredConstructors()) { final ActionParameterTypes sig = sarlSignatureProvider.createParameterTypesFromJvmModel( cons.isVarArgs(), cons.getParameters());