本文整理汇总了Java中java.lang.invoke.SwitchPoint.invalidateAll方法的典型用法代码示例。如果您正苦于以下问题:Java SwitchPoint.invalidateAll方法的具体用法?Java SwitchPoint.invalidateAll怎么用?Java SwitchPoint.invalidateAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.lang.invoke.SwitchPoint
的用法示例。
在下文中一共展示了SwitchPoint.invalidateAll方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: requestRecompile
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
boolean requestRecompile(final RewriteException e) {
final Type retType = e.getReturnType();
final Type previousFailedType = invalidatedProgramPoints.put(e.getProgramPoint(), retType);
if (previousFailedType != null && !previousFailedType.narrowerThan(retType)) {
final StackTraceElement[] stack = e.getStackTrace();
final String functionId = stack.length == 0 ?
data.getName() :
stack[0].getClassName() + "." + stack[0].getMethodName();
log.info("RewriteException for an already invalidated program point ", e.getProgramPoint(), " in ", functionId, ". This is okay for a recursive function invocation, but a bug otherwise.");
return false;
}
SwitchPoint.invalidateAll(new SwitchPoint[] { optimisticAssumptions });
return true;
}
示例2: invalidateSwitchPoint
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
@SuppressWarnings("unused")
private static Object invalidateSwitchPoint(final AccessorProperty property, final Object obj) {
if (!property.builtinSwitchPoint.hasBeenInvalidated()) {
SwitchPoint.invalidateAll(new SwitchPoint[] { property.builtinSwitchPoint });
}
return obj;
}
示例3: invalidateProtoGetSwitchPoint
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
* Indicate that a prototype property has changed.
*
* @param property {@link Property} to invalidate.
*/
synchronized void invalidateProtoGetSwitchPoint(final Property property) {
if (protoGetSwitches != null) {
final String key = property.getKey();
final SwitchPoint sp = protoGetSwitches.get(key);
if (sp != null) {
protoGetSwitches.remove(key);
if (Context.DEBUG) {
protoInvalidations++;
}
SwitchPoint.invalidateAll(new SwitchPoint[] { sp });
}
}
}
示例4: invalidateAllProtoGetSwitchPoints
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
* Indicate that proto itself has changed in hierarchy somewhere.
*/
synchronized void invalidateAllProtoGetSwitchPoints() {
if (protoGetSwitches != null && !protoGetSwitches.isEmpty()) {
if (Context.DEBUG) {
protoInvalidations += protoGetSwitches.size();
}
SwitchPoint.invalidateAll(protoGetSwitches.values().toArray(new SwitchPoint[protoGetSwitches.values().size()]));
protoGetSwitches.clear();
}
}
示例5: invalidateProtoSwitchPoint
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
* Indicate that a prototype property has changed.
*
* @param key {@link Property} key to invalidate.
*/
synchronized void invalidateProtoSwitchPoint(final Object key) {
if (protoSwitches != null) {
final SwitchPoint sp = protoSwitches.get(key);
if (sp != null) {
protoSwitches.remove(key);
if (Context.DEBUG) {
protoInvalidations.increment();
}
SwitchPoint.invalidateAll(new SwitchPoint[]{sp});
}
}
}
示例6: invalidateAllProtoSwitchPoints
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
* Indicate that proto itself has changed in hierarchy somewhere.
*/
synchronized void invalidateAllProtoSwitchPoints() {
if (protoSwitches != null) {
final int size = protoSwitches.size();
if (size > 0) {
if (Context.DEBUG) {
protoInvalidations.add(size);
}
SwitchPoint.invalidateAll(protoSwitches.values().toArray(new SwitchPoint[0]));
protoSwitches.clear();
}
}
}
示例7: invalidateLexicalSwitchPoint
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
private synchronized void invalidateLexicalSwitchPoint() {
if (lexicalScopeSwitchPoint != null) {
context.getLogger(GlobalConstants.class).info("Invalidating non-constant globals on lexical scope update");
SwitchPoint.invalidateAll(new SwitchPoint[]{ lexicalScopeSwitchPoint });
}
}
示例8: invalidate
import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
private void invalidate(final int count) {
if (!sp.hasBeenInvalidated()) {
SwitchPoint.invalidateAll(new SwitchPoint[] { sp });
invalidations += count;
}
}