View Javadoc

1   /*
2    * Copyright 2004-2009 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.springmodules.validation.valang.functions;
18  
19  /**
20   * Defines a function. This definition holds the function name
21   * and the fully qualified name of the function class.
22   *
23   * @author Uri Boness
24   */
25  public class FunctionDefinition {
26  
27      private String name;
28  
29      private String className;
30  
31      /**
32       * Constructs a new FunctionDefinition.
33       */
34      public FunctionDefinition() {
35          this(null, null);
36      }
37  
38      /**
39       * Constructs a new FunctionDefinition with a given name and fully qulified class name.
40       *
41       * @param name The name of the function.
42       * @param className The fully qualified class name of the function.
43       */
44      public FunctionDefinition(String name, String className) {
45          this.name = name;
46          this.className = className;
47      }
48  
49      //=============================================== Setter/Getter ====================================================
50  
51      public String getName() {
52          return name;
53      }
54  
55      public void setName(String name) {
56          this.name = name;
57      }
58  
59      public String getClassName() {
60          return className;
61      }
62  
63      public void setClassName(String className) {
64          this.className = className;
65      }
66  }