本文整理匯總了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;
}