1 22 23 24 package org.xquark.xquery.parser.primitivefunctions.fnfunctions; 25 26 import java.util.ArrayList ; 27 28 import org.xquark.xquery.parser.*; 29 import org.xquark.xquery.typing.TypeException; 30 31 public class FunctionABS extends PrimitiveFunctionCall { 32 private static final String RCSRevision = "$Revision: 1.4 $"; 33 private static final String RCSName = "$Name: $"; 34 35 39 public void accept(ParserVisitor visitor) throws XQueryException { 40 visitor.visit(this); 41 } 42 43 47 public FunctionABS(ArrayList args, XQueryModule parentModule) throws TypeException, XQueryException { 48 super(new QName("abs",null),args); 49 setParentModule(parentModule); 50 if (parentModule != null && parentModule.getStaticContext().getTypeVisitor() != null) 51 accept(parentModule.getStaticContext().getTypeVisitor()); 52 } 53 54 public void setArguments(ArrayList arguments) throws XQueryException { 56 if (arguments == null || arguments.size() != 1) throw new XQueryException("Function abs should have one argument"); 57 super.setArguments(arguments); 58 } 59 60 } 61 62 63 | Popular Tags |