1 /* |
1 /* |
2 * reserved comment block |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT REMOVE OR ALTER! |
3 * @LastModified: Oct 2017 |
4 */ |
4 */ |
5 /* |
5 /* |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
7 * contributor license agreements. See the NOTICE file distributed with |
7 * contributor license agreements. See the NOTICE file distributed with |
8 * this work for additional information regarding copyright ownership. |
8 * this work for additional information regarding copyright ownership. |
19 * limitations under the License. |
19 * limitations under the License. |
20 */ |
20 */ |
21 |
21 |
22 package com.sun.org.apache.xalan.internal.xsltc.compiler; |
22 package com.sun.org.apache.xalan.internal.xsltc.compiler; |
23 |
23 |
24 import java.lang.reflect.Method; |
|
25 import java.lang.reflect.Modifier; |
|
26 import java.util.Vector; |
|
27 |
|
28 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; |
24 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; |
29 import com.sun.org.apache.bcel.internal.generic.PUSH; |
25 import com.sun.org.apache.bcel.internal.generic.PUSH; |
|
26 import com.sun.org.apache.xalan.internal.utils.ObjectFactory; |
30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; |
27 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; |
31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; |
28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; |
32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; |
29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; |
33 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; |
30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; |
34 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; |
31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; |
35 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; |
32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; |
36 import com.sun.org.apache.xalan.internal.utils.ObjectFactory; |
33 import java.lang.reflect.Method; |
|
34 import java.lang.reflect.Modifier; |
|
35 import java.util.List; |
37 |
36 |
38 /** |
37 /** |
39 * @author G. Todd Miller |
38 * @author G. Todd Miller |
40 * @author Santiago Pericas-Geertsen |
39 * @author Santiago Pericas-Geertsen |
41 */ |
40 */ |
50 * Constructs a FunctionAvailableCall FunctionCall. Takes the |
49 * Constructs a FunctionAvailableCall FunctionCall. Takes the |
51 * function name qname, for example, 'function-available', and |
50 * function name qname, for example, 'function-available', and |
52 * a list of arguments where the arguments must be instances of |
51 * a list of arguments where the arguments must be instances of |
53 * LiteralExpression. |
52 * LiteralExpression. |
54 */ |
53 */ |
55 public FunctionAvailableCall(QName fname, Vector arguments) { |
54 public FunctionAvailableCall(QName fname, List<Expression> arguments) { |
56 super(fname, arguments); |
55 super(fname, arguments); |
57 _arg = (Expression)arguments.elementAt(0); |
56 _arg = (Expression)arguments.get(0); |
58 _type = null; |
57 _type = null; |
59 |
58 |
60 if (_arg instanceof LiteralExpr) { |
59 if (_arg instanceof LiteralExpr) { |
61 LiteralExpr arg = (LiteralExpr) _arg; |
60 LiteralExpr arg = (LiteralExpr) _arg; |
62 _namespaceOfFunct = arg.getNamespace(); |
61 _namespaceOfFunct = arg.getNamespace(); |