/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { String name = (String) value; // <xsd:attribute name="nArgs" type="xsd:string" use="required"/> String nargs = (String) node.getAttributeValue("nArgs"); return factory.functionName(name, Integer.parseInt(nargs)); }
static FunctionName functionName(String name, int args) { return ff.functionName(name, args); }
static FunctionName functionName(String name, int args) { return ff.functionName(name, args); }
private FunctionName getFunctionName(Function function) { String name = function.getName(); FunctionName functionName = function.getFunctionName(); if (functionName == null && function instanceof FunctionExpressionImpl) { functionName = function.getFunctionName(); } if (functionName == null) { int argc; argc = function.getParameters().size(); functionName = filterFactory.functionName(name, argc); if (!functionName.getName().equals(name)) { LOGGER.warning( function.getClass() + " FunctionName was null, used for etArgumentCount(): " + functionName); } } else { if (!functionName.getName().equals(name)) { LOGGER.warning( function.getClass() + " has name conflict betwee '" + name + "' and '" + functionName.getName() + "'"); } } return functionName; }
@Test public void testFunctionMetaInfo() { FunctionName functionName = ff.functionName("listMultiply", 2); assertNotNull(functionName); }
public QueryLayerFunctionFactory() { FilterFactory ff = CommonFactoryFinder.getFilterFactory(null); List<FunctionName> names = new ArrayList<FunctionName>(); names.add(ff.functionName(QUERY_SINGLE, -1)); // 2 or 3 args names.add(ff.functionName(QUERY_COLLECTION, -1)); // 2 or 3 args names.add(ff.functionName(COLLECT_GEOMETRIES, 1)); functionNames = Collections.unmodifiableList(names); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { String name = (String) value; //<xsd:attribute name="nArgs" type="xsd:string" use="required"/> String nargs = (String) node.getAttributeValue("nArgs"); return factory.functionName(name, Integer.parseInt(nargs)); }
private FunctionName getFunctionName( Function function ){ String name = function.getName(); FunctionName functionName = function.getFunctionName(); if( functionName == null && function instanceof FunctionExpressionImpl){ functionName = function.getFunctionName(); } if( functionName == null ){ int argc; if( function instanceof FunctionExpression ){ argc = ((FunctionExpression)function).getArgCount(); } else { argc = function.getParameters().size(); } functionName = filterFactory.functionName(name, argc ); } else { if( !functionName.getName().equals(name )){ LOGGER.warning( function.getClass() +" has name conflict betwee '"+name+"' and '"+functionName.getName()+"'"); } } return functionName; } private Map<Name,FunctionDescriptor> loadFunctions() {