本文整理汇总了Java中org.eclipse.jdt.internal.eval.GlobalVariable类的典型用法代码示例。如果您正苦于以下问题:Java GlobalVariable类的具体用法?Java GlobalVariable怎么用?Java GlobalVariable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GlobalVariable类属于org.eclipse.jdt.internal.eval包,在下文中一共展示了GlobalVariable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allVariables
import org.eclipse.jdt.internal.eval.GlobalVariable; //导入依赖的package包/类
/**
* @see org.eclipse.jdt.core.eval.IEvaluationContext#allVariables()
*/
public IGlobalVariable[] allVariables() {
GlobalVariable[] vars = this.context.allVariables();
int length = vars.length;
GlobalVariableWrapper[] result = new GlobalVariableWrapper[length];
for (int i = 0; i < length; i++) {
result[i] = new GlobalVariableWrapper(vars[i]);
}
return result;
}
示例2: newVariable
import org.eclipse.jdt.internal.eval.GlobalVariable; //导入依赖的package包/类
/**
* @see org.eclipse.jdt.core.eval.IEvaluationContext#newVariable(String, String, String)
*/
public IGlobalVariable newVariable(String typeName, String name, String initializer) {
GlobalVariable newVar =
this.context.newVariable(
typeName.toCharArray(),
name.toCharArray(),
(initializer == null) ?
null :
initializer.toCharArray());
return new GlobalVariableWrapper(newVar);
}
示例3: GlobalVariableWrapper
import org.eclipse.jdt.internal.eval.GlobalVariable; //导入依赖的package包/类
/**
* Creates a new wrapper around the given infrastructure global variable.
*/
GlobalVariableWrapper(GlobalVariable variable) {
this.variable = variable;
}