public void disposeRules(final BatchTransformationRuleGroup rules) { Iterable<BatchTransformationRule<?, ?>> _filterNull = IterableExtensions.<BatchTransformationRule<?, ?>>filterNull(rules); final Procedure1<BatchTransformationRule<?, ?>> _function = new Procedure1<BatchTransformationRule<?, ?>>() { @Override public void apply(final BatchTransformationRule<?, ?> it) { RuleSpecification<? extends IPatternMatch> _ruleSpecification = it.getRuleSpecification(); EventFilter<?> _filter = it.getFilter(); BatchTransformationStatements.this.ruleEngine.removeRule(_ruleSpecification, ((EventFilter<IPatternMatch>) _filter)); } }; IterableExtensions.<BatchTransformationRule<?, ?>>forEach(_filterNull, _function); }
public Iterable<FArgument> getOutputParameters(final FBroadcast event) { if (((event == null) || (event.getOutArgs().size() == 0))) { return new HashSet<FArgument>(); } else { return IterableExtensions.<FArgument>filterNull(event.getOutArgs()); } }
public Iterable<FArgument> getInputParameters(final FMethod method) { if (((method == null) || (method.getInArgs().size() == 0))) { return new HashSet<FArgument>(); } else { return IterableExtensions.<FArgument>filterNull(method.getInArgs()); } }
public Iterable<FArgument> getOutputParameters(final FMethod method) { if (((method == null) || (method.getOutArgs().size() == 0))) { return new HashSet<FArgument>(); } else { return IterableExtensions.<FArgument>filterNull(method.getOutArgs()); } }
private void translateAnnotations(final JvmAnnotationTarget target, final List<XAnnotation> annotations) { final Function1<XAnnotation, Boolean> _function = new Function1<XAnnotation, Boolean>() { @Override public Boolean apply(final XAnnotation it) { JvmType _annotationType = it.getAnnotationType(); return Boolean.valueOf((_annotationType != null)); } }; this._jvmTypesBuilder.addAnnotations(target, IterableExtensions.<XAnnotation>filter(IterableExtensions.<XAnnotation>filterNull(annotations), _function)); }
public HashSet<Object> getAllRequiredTypes(final FBroadcast broadcast) { HashSet<Object> typeList = new HashSet<Object>(); Iterable<FArgument> _filterNull = IterableExtensions.<FArgument>filterNull(this.getOutputParameters(broadcast)); for (final FArgument outParameter : _filterNull) { Iterables.<Object>addAll(typeList, this._typeUtil.getRequiredTypes(outParameter.getType())); } return typeList; }
public boolean hasEnumInputParameter(final FMethod method) { Iterable<FArgument> _filterNull = IterableExtensions.<FArgument>filterNull(this.getInputParameters(method)); for (final FArgument inputParameter : _filterNull) { Object _datatype = this._typeUtil.getDatatype(inputParameter.getType()); if ((_datatype instanceof FEnumerationType)) { return true; } } return false; }
/** * @param method the method for which the signature shall be created * @return a method signature that is unique in terms of method name, out * parameter names and out parameter types. */ public String createMethodSignatureFromOutParameters(final FMethod method) { return this.createParameterSignatureForMethod(method.getName(), IterableExtensions.<FArgument>filterNull(method.getOutArgs())); }
protected LightweightTypeReference visit(final List<LightweightTypeReference> references) { final Function1<LightweightTypeReference, LightweightTypeReference> _function = (LightweightTypeReference it) -> { return it.<LightweightTypeReference>accept(this); }; return IterableExtensions.<LightweightTypeReference>head(IterableExtensions.<LightweightTypeReference>filterNull(ListExtensions.<LightweightTypeReference, LightweightTypeReference>map(references, _function))); }
public String getDocHtml(final String summary, final String doc) { String _join = IterableExtensions.join(IterableExtensions.<String>filterNull(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(summary, doc))), "\n\n"); String _processMarkdown = null; if (_join!=null) { _processMarkdown=this.processMarkdown(_join); } return this.wrap(_processMarkdown); }
/** * @param method the method for which the signature shall be created * @return a method signature that is unique in terms of method name, in * parameter names and in parameter types. */ public String createMethodSignatureFromInParameters(final FMethod method) { return this.createParameterSignatureForMethod(method.getName(), IterableExtensions.<FArgument>filterNull(method.getInArgs())); }
public Iterable<FEnumerationType> getEnumDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isEnum(type)); }; final Function1<FType, FEnumerationType> _function_1 = (FType type) -> { return this._typeUtil.getEnumType(type); }; return IterableExtensions.<FEnumerationType>filterNull(IterableExtensions.<FType, FEnumerationType>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
public Iterable<FTypeDef> getTypeDefDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isTypeDef(type)); }; final Function1<FType, FTypeDef> _function_1 = (FType type) -> { return this._typeUtil.getTypeDefType(type); }; return IterableExtensions.<FTypeDef>filterNull(IterableExtensions.<FType, FTypeDef>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
/** * check that this variableReference is used according to its (expected) type */ private void checkVariableReferenceIsUsedWellTyped(final VariableReference variableReference, final Map<String, JvmTypeReference> declaredVariablesTypeMap, final TestStepContext context, final int errorReportingIndex) { final String varName = variableReference.getVariable().getName(); final Set<Optional<JvmTypeReference>> typeUsageSet = IterableExtensions.<Optional<JvmTypeReference>>toSet(IterableExtensions.<Optional<JvmTypeReference>>filterNull(this.typeUsageComputer.getAllPossibleTypeUsagesOfVariable(context, varName))); final JvmTypeReference typeDeclared = declaredVariablesTypeMap.get(varName); this.checkVariableReferenceIsWellTyped(variableReference, typeUsageSet, typeDeclared, errorReportingIndex); }
public Iterable<FCompoundType> getCompoundDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isCompound(type)); }; final Function1<FType, FCompoundType> _function_1 = (FType type) -> { return this._typeUtil.getCompoundType(type); }; return IterableExtensions.<FCompoundType>filterNull(IterableExtensions.<FType, FCompoundType>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
public Iterable<FMapType> getMapDataTypes(final FModel fModel) { final Function1<FType, Boolean> _function = (FType type) -> { return Boolean.valueOf(this._typeUtil.isMap(type)); }; final Function1<FType, FMapType> _function_1 = (FType type) -> { return this._typeUtil.getMapType(type); }; return IterableExtensions.<FMapType>filterNull(IterableExtensions.<FType, FMapType>map(IterableExtensions.<FType>filter(this.getDataTypes(fModel), _function), _function_1)); }
private Set<JvmType> _getTestStepFixtureTypes(final MacroTestStepContext context) { final Function1<TestStep, Iterable<JvmType>> _function = (TestStep it) -> { final Macro macro = this._tclModelUtil.findMacroDefinition(it, context); if ((macro != null)) { final Function1<TestStepContext, Set<JvmType>> _function_1 = (TestStepContext it_1) -> { return this.getTestStepFixtureTypes(it_1); }; return Iterables.<JvmType>concat(IterableExtensions.<TestStepContext, Set<JvmType>>map(IterableExtensions.<TestStepContext>filterNull(macro.getContexts()), _function_1)); } else { return Collections.<JvmType>unmodifiableSet(CollectionLiterals.<JvmType>newHashSet()); } }; return IterableExtensions.<JvmType>toSet(Iterables.<JvmType>concat(IterableExtensions.<TestStep, Iterable<JvmType>>map(Iterables.<TestStep>filter(context.getSteps(), TestStep.class), _function))); }
public String getElementTypeName(final Object obj) { String _xblockexpression = null; { final Object elementType = this.getElementType(obj); String _type = null; if (elementType!=null) { _type=this.attributeHelper.getType(elementType); } String _rzveTypeName = this.attributeHelper.getRzveTypeName(elementType); _xblockexpression = IterableExtensions.<String>last(IterableExtensions.<String>filterNull(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(_type, _rzveTypeName)))); } return _xblockexpression; }
private Set<JvmType> _getTestStepFixtureTypes(final ComponentTestStepContext context) { final Set<InteractionType> interactionTypes = IterableExtensions.<InteractionType>toSet(this._modelUtil.getAllInteractionTypes(context.getComponent())); final Function1<InteractionType, JvmType> _function = (InteractionType it) -> { return this._modelUtil.getFixtureType(it); }; final Set<JvmType> fixtureTypes = IterableExtensions.<JvmType>toSet(IterableExtensions.<JvmType>filterNull(IterableExtensions.<InteractionType, JvmType>map(interactionTypes, _function))); return fixtureTypes; }
public TypeReference getLeftType(final TypeReference typeReference) { final Type type = typeReference.getType(); Type _type = this.eitherType.getType(); boolean _tripleEquals = (type == _type); if (_tripleEquals) { return IterableExtensions.<TypeReference>head(typeReference.getActualTypeArguments()); } if ((type instanceof InterfaceDeclaration)) { final Function1<TypeReference, TypeReference> _function = (TypeReference it) -> { return this.getLeftType(it); }; return IterableExtensions.<TypeReference>head(IterableExtensions.<TypeReference>filterNull(IterableExtensions.map(((InterfaceDeclaration)type).getExtendedInterfaces(), _function))); } return null; }