astfunnode.java

来自「mysql集群」· Java 代码 · 共 69 行

JAVA
69
字号
/* Generated By:JJTree: Do not edit this line. ASTFunNode.java */
package com.meidusa.amoeba.sqljep;


import com.meidusa.amoeba.sqljep.function.PostfixCommandI;

/**
 * Function Node
 */
public class ASTFunNode extends SimpleNode {
	
	/** The function class used to evaluate the node */
	private PostfixCommandI pfmc;
	
	/** Name of the function */
	private String name;
	
	/**
	 * Creates a new ASTFunNode
	 */
	public ASTFunNode(int id) {
		super(id);
	}
	
	/**
	 * Creates a new ASTFunNode
	 */
	public ASTFunNode(Parser p, int id) {
		super(p, id);
	}
	
	/**
	 * Accept the visitor.
	 */
	public Object jjtAccept(ParserVisitor visitor, Object data) throws ParseException {
		return visitor.visit(this, data);
	}

	/**
	 * Sets the function for a node. A name and function class must
	 * be specified.
	 */	
	public void setFunction(String name_in, PostfixCommandI pfmc_in) {
		name = name_in;
		pfmc = pfmc_in;
	}

	/**
	 * Returns a string containing the function name.
	 */
	public String toString() {
		return "Function \"" + name + "\"";
	}

	/**
	 * Returns the math command class associated with this node.
	 */
	public PostfixCommandI getPFMC() {
		return pfmc;
	}
	
	/**
	 * Returns the name of the node (operator symbol or function name).
	 */
	public String getName() {
		return name;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?