symboltraits.java

来自「plugin for eclipse」· Java 代码 · 共 67 行

JAVA
67
字号
/*
 * Created on Jun 6, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package isis.anp.nesc.ot.scope;

import isis.anp.common.TNode;

/**
 * @author sallai
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class SymbolTraits {
	TNode nameNode;
	String name;
	Scope parentScope;

	/**
	 * @return Returns the nameNode.
	 */
	public TNode getNameNode() {
		return nameNode;
	}
	/**
	 * @param nameNode The nameNode to set.
	 */
	public void setNameNode(TNode nameNode) {
		this.nameNode = nameNode;
		if(nameNode !=null){
			this.name = nameNode.getText();
		}
	}
	
	public void setName(String name) {
		this.name = name;
		if(this.nameNode !=null) {
			nameNode.setText(name);
		}
	}
	
	public String getName() {
		return name;
	}
	
	public void setParentScope(Scope parentScope) {
		this.parentScope = parentScope;
	}

	public Scope getParentScope() {
		return parentScope;
	}

	public String getHierarchicalName() {
		if(getParentScope() == null) {
			return getName();
		} else {
			return getParentScope().getHierarchicalName()+"::"+getName();
		}
	}
	
	
}

⌨️ 快捷键说明

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