@Override public Set<String> getAllStyleIds() { return CollectionLiterals.<String>emptySet(); } }
/** * @return all interaction types of the {@link Component} as well as its elements. */ public Set<InteractionType> getAllInteractionTypes(final Component component) { if ((component != null)) { Set<InteractionType> _componentInteractionTypes = this.getComponentInteractionTypes(component); Set<InteractionType> _componentElementsInteractionTypes = this.getComponentElementsInteractionTypes(component); return IterableExtensions.<InteractionType>toSet(Iterables.<InteractionType>concat(_componentInteractionTypes, _componentElementsInteractionTypes)); } return CollectionLiterals.<InteractionType>emptySet(); }
/** * @return all {@link TemplateVariable variables} that can be referenced * from the outside, i.e. have a name that is not "element" */ public Set<TemplateVariable> getReferenceableVariables(final Template template) { if ((template != null)) { final Function1<TemplateVariable, Boolean> _function = (TemplateVariable it) -> { return Boolean.valueOf(((!StringExtensions.isNullOrEmpty(it.getName())) && (!Objects.equal(it.getName(), ModelUtil.TEMPLATE_VARIABLE_ELEMENT)))); }; return IterableExtensions.<TemplateVariable>toSet(IterableExtensions.<TemplateVariable>filter(Iterables.<TemplateVariable>filter(template.getContents(), TemplateVariable.class), _function)); } else { return CollectionLiterals.<TemplateVariable>emptySet(); } }
public Collection<IGrammarConstraintProvider.IConstraint> getGrammarConstraints(final Grammar grammar) { if ((grammar == null)) { return CollectionLiterals.<IGrammarConstraintProvider.IConstraint>emptySet(); } final Function1<SerializationContextMap.Entry<IGrammarConstraintProvider.IConstraint>, IGrammarConstraintProvider.IConstraint> _function = (SerializationContextMap.Entry<IGrammarConstraintProvider.IConstraint> it) -> { return it.getValue(); }; return ListExtensions.<SerializationContextMap.Entry<IGrammarConstraintProvider.IConstraint>, IGrammarConstraintProvider.IConstraint>map(this.gcp.getConstraints(grammar).values(), _function); }
public Set<String> getFQFeatureNamesToExclude(final Grammar g) { Set<String> _xifexpression = null; Grammar _nonTerminalsSuperGrammar = GrammarUtil2.getNonTerminalsSuperGrammar(g); boolean _tripleNotEquals = (_nonTerminalsSuperGrammar != null); if (_tripleNotEquals) { Sets.SetView<String> _xblockexpression = null; { final Set<String> thisGrammarFqFeatureNames = IterableExtensions.<String>toSet(this.computeFQFeatureNames(g)); final Function1<Grammar, Iterable<String>> _function = (Grammar it) -> { return this.computeFQFeatureNames(it); }; final Set<String> superGrammarsFqFeatureNames = IterableExtensions.<String>toSet(Iterables.<String>concat(ListExtensions.<Grammar, Iterable<String>>map(GrammarUtil.allUsedGrammars(g), _function))); _xblockexpression = Sets.<String>intersection(thisGrammarFqFeatureNames, superGrammarsFqFeatureNames); } _xifexpression = _xblockexpression; } else { _xifexpression = CollectionLiterals.<String>emptySet(); } return _xifexpression; }
@Check public void checkVariableUsage(final Macro macro) { Iterable<String> _xifexpression = null; Template _template = macro.getTemplate(); boolean _tripleEquals = (_template == null); if (_tripleEquals) { _xifexpression = CollectionLiterals.<String>emptySet(); } else { final Function1<TemplateVariable, String> _function = (TemplateVariable it) -> { return it.getName(); }; _xifexpression = IterableExtensions.<TemplateVariable, String>map(this._tclModelUtil.amlModelUtil.getReferenceableVariables(macro.getTemplate()), _function); } final Iterable<String> macroParameterNames = _xifexpression; final HashSet<String> declaredVariableNames = CollectionLiterals.<String>newHashSet(); Iterables.<String>addAll(declaredVariableNames, macroParameterNames); final Consumer<TestStepContext> _function_1 = (TestStepContext it) -> { this.checkAllReferencedVariablesAreKnown(it, declaredVariableNames, TclValidator.ERROR_MESSAGE_FOR_INVALID_VAR_REFERENCE); declaredVariableNames.addAll(this.variableCollector.collectDeclaredVariablesTypeMap(it).keySet()); }; macro.getContexts().forEach(_function_1); }
/** * Check that all variables are used such that * their types match the expectation (e.g. of the fixture transitively called) */ @Check public void checkVariableUsageIsWellTyped(final Macro macro) { Set<String> _xifexpression = null; Template _template = macro.getTemplate(); boolean _tripleEquals = (_template == null); if (_tripleEquals) { _xifexpression = CollectionLiterals.<String>emptySet(); } else { final Function1<TemplateVariable, String> _function = (TemplateVariable it) -> { return it.getName(); }; _xifexpression = IterableExtensions.<String>toSet(IterableExtensions.<TemplateVariable, String>map(this._tclModelUtil.amlModelUtil.getReferenceableVariables(macro.getTemplate()), _function)); } final Set<String> macroParameterNames = _xifexpression; final HashMap<String, JvmTypeReference> knownVariablesTypeMapWithinMacro = CollectionLiterals.<String, JvmTypeReference>newHashMap(); final Consumer<TestStepContext> _function_1 = (TestStepContext it) -> { knownVariablesTypeMapWithinMacro.putAll(this.variableCollector.collectDeclaredVariablesTypeMap(it)); }; macro.getContexts().forEach(_function_1); final Consumer<TestStepContext> _function_2 = (TestStepContext it) -> { this.checkReferencedVariablesAreUsedWellTypedExcluding(it, knownVariablesTypeMapWithinMacro, macroParameterNames); }; macro.getContexts().forEach(_function_2); }