KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xpath > impl > XPathExtensionFunctionImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.xpath.impl;
21
22
23 import java.util.Iterator JavaDoc;
24
25 import org.netbeans.modules.xml.xpath.XPathExtensionFunction;
26 import org.netbeans.modules.xml.xpath.function.extension.visitor.XPathExtensionFunctionVisitor;
27 import org.netbeans.modules.xml.xpath.visitor.XPathVisitable;
28 import org.netbeans.modules.xml.xpath.visitor.XPathVisitor;
29
30
31 /**
32  * Represents a extension XPath function.
33  *
34  * @author Enrico Lelina
35  * @version $Revision: 1.4 $
36  */

37 public class XPathExtensionFunctionImpl
38     extends XPathOperatorOrFunctionImpl
39     implements XPathExtensionFunction {
40         
41     /** The function name. */
42     String JavaDoc mName;
43     
44     
45     /**
46      * Constructor.
47      * Instantiates a new XPathExtensionFunction with the given name.
48      * @param name the function name
49      */

50     public XPathExtensionFunctionImpl(String JavaDoc name) {
51         super();
52         setName(name);
53     }
54     
55     
56     /**
57      * Gets the name of the function.
58      * @return the function name
59      */

60     public String JavaDoc getName() {
61         return mName;
62     }
63     
64     
65     /**
66      * Sets the function name.
67      * @param name the new function name
68      */

69     public void setName(String JavaDoc name) {
70         mName = name;
71     }
72
73     /**
74      * Calls the visitor.
75      * @param visitor the visitor
76      */

77     public void accept(XPathVisitor visitor) {
78         visitor.visit(this);
79         
80     }
81
82
83     public void accept(XPathExtensionFunctionVisitor visitor) {
84         //do nothing
85
}
86     
87     
88 }
89
Popular Tags