/** * @return The component name: the Configuration name, Operation name, etc. */ public String getName() { return declaration.getName(); }
private <T extends NamedDeclaration> T findDeclarationByName(Collection<T> declarations, String name) { return declarations.stream().filter(decl -> decl.getName().equals(name)).findFirst() .orElseThrow(() -> new NoSuchElementException()); }
public static <T extends NamedDeclaration> T getDeclaration(List<T> operationList, String name) { return operationList.stream().filter(operation -> operation.getName().equals(name)).collect(toList()).get(0); }
private NamedDeclaration getNamedDeclaration(List<? extends NamedDeclaration> namedDeclarationList, String name) { for (NamedDeclaration namedDeclaration : namedDeclarationList) { if (namedDeclaration.getName().equals(name)) { return namedDeclaration; } } fail("No namedDeclaration with name " + name + " was found in list."); return null; }
.getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()) .getName(), groupName, ParameterGroup.class.getSimpleName())); .getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()) .getName())); } else { declarer.withModelProperty(new ParameterGroupModelProperty(
/** * @return The component name: the Configuration name, Operation name, etc. */ public String getName() { return declaration.getName(); }
.getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()) .getName(), groupName, ParameterGroup.class.getSimpleName())); .getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()) .getName())); } else { declarer.withModelProperty(new ParameterGroupModelProperty(