本文整理汇总了Java中javax.security.auth.Refreshable类的典型用法代码示例。如果您正苦于以下问题:Java Refreshable类的具体用法?Java Refreshable怎么用?Java Refreshable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Refreshable类属于javax.security.auth包,在下文中一共展示了Refreshable类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValueOf
import javax.security.auth.Refreshable; //导入依赖的package包/类
private Object getValueOf(Variable var, Object row, String columnID) {
if (var instanceof Refreshable) {
boolean current = ((Refreshable) var).isCurrent();
if (!current) {
return var.getValue();
}
}
if (ValuePropertyEditor.hasPropertyEditorFor(var)) {
Object mirror = var.createMirrorObject();
synchronized (mirrors) {
if (mirror == null) {
mirrors.remove(var);
origValues.remove(var);
} else {
mirrors.put(var, mirror);
//origValues.put(var, ((JDIVariable) var).getJDIValue());
}
// Put in any case, the mirror might not be applicable to the property editor.
values.put(var, var.getValue());
}
} else {
return var.getValue();
/*synchronized (mirrors) {
values.put(var, var.getValue());
}*/
}
boolean isROCheck;
synchronized (checkReadOnlyMutables) {
isROCheck = checkReadOnlyMutables.remove((Variable) row);
}
if (true || isROCheck) {
fireModelChange(new ModelEvent.TableValueChanged(this, row, columnID, ModelEvent.TableValueChanged.IS_READ_ONLY_MASK));
}
return var;
}
示例2: waitToEvaluate
import javax.security.auth.Refreshable; //导入依赖的package包/类
private static void waitToEvaluate(Object o) {
if (o instanceof Refreshable) {
// waits for the evaluation, the retrieval must already be initiated
try {
((Refreshable) o).refresh();
} catch (RefreshFailedException exc) {
// Thrown when interrupted
Thread.currentThread().interrupt();
}
}
loadAllTypes(o); // Initialize all types, implemented interfaces and super classes
}
示例3: isLeaf
import javax.security.auth.Refreshable; //导入依赖的package包/类
public boolean isLeaf (final Object o) throws UnknownTypeException {
if (o.equals (ROOT))
return false;
if (o instanceof AbstractVariable) {
if (o instanceof FieldVariable) {
return true;
}
if (o instanceof Refreshable && !((Refreshable) o).isCurrent()) {
debugger.getRequestProcessor().post(new Runnable() {
public void run() {
try {
((Refreshable) o).refresh();
} catch (RefreshFailedException ex) {
return ;
}
if (!(((AbstractVariable) o).getInnerValue () instanceof ObjectReference)) {
fireNodeChildrenChanged(o);
}
}
});
return false;
}
return !(((AbstractVariable) o).getInnerValue () instanceof ObjectReference);
}
if (o.toString().startsWith("SubArray")) {
return false;
}
if (o.equals ("NoInfo")) // NOI18N
return true;
if (o instanceof JPDAClassType) return false;
if (o instanceof Operation) return false;
if (o == "lastOperations") return false;
if (o == NO_DEBUG_INFO) return true;
if (o instanceof String && ((String) o).startsWith("operationArguments")) { // NOI18N
return false;
}
throw new UnknownTypeException (o);
}
示例4: isEnabled
import javax.security.auth.Refreshable; //导入依赖的package包/类
@Override
public boolean isEnabled (Object node) {
if ((node == null) || (!(node instanceof ObjectVariable))) {
return false;
}
ObjectVariable var = (ObjectVariable) node;
if (var instanceof Refreshable) {
if (!((Refreshable) var).isCurrent()) {
return false;
}
}
return var.getUniqueID() != 0L;
}
示例5: getLabel
import javax.security.auth.Refreshable; //导入依赖的package包/类
public String getLabel(ObjectVariable var) {
if (var instanceof Refreshable) {
if (!((Refreshable) var).isCurrent()) {
return null;
}
}
synchronized (markedObjects) {
return markedObjects.get(var.getUniqueID());
}
}
示例6: isReadOnlyVar
import javax.security.auth.Refreshable; //导入依赖的package包/类
static boolean isReadOnlyVar(Object row, JPDADebugger debugger) {
if (row instanceof This)
return true;
else {
if (row instanceof JPDAWatch && row instanceof Refreshable) {
if (!((Refreshable) row).isCurrent()) {
return true;
}
try {
// Retrieve the evaluated watch so that we can test if it's an object variable or not.
java.lang.reflect.Method getEvaluatedWatchMethod = row.getClass().getDeclaredMethod("getEvaluatedWatch");
getEvaluatedWatchMethod.setAccessible(true);
row = (JPDAWatch) getEvaluatedWatchMethod.invoke(row);
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
}
}
if (row instanceof JPDAWatch) {
JPDAWatch w = (JPDAWatch) row;
String e = w.getExceptionDescription ();
if (e != null) {
return true; // Errors are read only
}
}
if (row instanceof MutableVariable) {
synchronized (checkReadOnlyMutables) {
checkReadOnlyMutables.add((MutableVariable) row);
}
Object mirror = getMirrorFor((Variable) row);
if (mirror != null) {
return false;
}
}
if (row instanceof ObjectVariable) {
String declaredType;
if (row instanceof LocalVariable) {
declaredType = ((LocalVariable) row).getDeclaredType();
} else if (row instanceof Field) {
declaredType = ((Field) row).getDeclaredType();
} else {
declaredType = ((ObjectVariable) row).getType();
}
// Allow to edit Strings
if (!"java.lang.String".equals(declaredType)) { // NOI18N
return true;
}
}
if ( row instanceof LocalVariable ||
row instanceof Field ||
row instanceof JPDAWatch
) {
if (WatchesNodeModelFilter.isEmptyWatch(row)) {
return true;
} else {
return !debugger.canBeModified();
}
} else {
return true;
}
}
}
示例7: isEvaluated
import javax.security.auth.Refreshable; //导入依赖的package包/类
public static boolean isEvaluated(Object o) {
if (o instanceof Refreshable) {
return ((Refreshable) o).isCurrent();
}
return true;
}