private ParameterDefinition initForm(final Form form) throws ParseException { if (form.isNil()) { error("NIL not allowed here", form); } List<SExpression> childs = form.getChildren(); if (childs.size() == 2) { return simpleInit(form); } else if (childs.size() == 3) { return suppliedTestInit(form); } else { error("Parameter list must be of length 2 or 3", form); return null; // wird nie erreicht } }
private void addKey(final ParameterDefinition key) { if (fKey == null) { fKey = new LinkedList<ParameterDefinition>(); } fKey.add(key); }
private void addAux(final ParameterDefinition aux) { if (fAux == null) { fAux = new LinkedList<ParameterDefinition>(); } fAux.add(aux); }
private void addOptional(final ParameterDefinition definition) { if (fOptional == null) { fOptional = new LinkedList<ParameterDefinition>(); } fOptional.add(definition); }
private void addRequired(final Symbol symbol) { if (fRequired == null) { fRequired = new LinkedList<RequiredParameterDefinition>(); } fRequired.add(new RequiredParameterDefinition(symbol)); }
private void addRequired(final SExpression form) { if (fRequired == null) { fRequired = new LinkedList<RequiredParameterDefinition>(); } fRequired.add(new RequiredParameterDefinition(form)); }