本文整理汇总了Java中sun.jvm.hotspot.memory.SymbolTable类的典型用法代码示例。如果您正苦于以下问题:Java SymbolTable类的具体用法?Java SymbolTable怎么用?Java SymbolTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SymbolTable类属于sun.jvm.hotspot.memory包,在下文中一共展示了SymbolTable类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doit
import sun.jvm.hotspot.memory.SymbolTable; //导入依赖的package包/类
public void doit(Tokens t) {
if (t.countTokens() != 1) {
usage();
} else {
out.println(SymbolTable.getTheTable().probe(t.nextToken()));
}
}
示例2: initClassNameSymbols
import sun.jvm.hotspot.memory.SymbolTable; //导入依赖的package包/类
private void initClassNameSymbols() {
SymbolTable st = saSymbolTable();
javaLangString = st.probe("java/lang/String");
javaLangThread = st.probe("java/lang/Thread");
javaLangThreadGroup = st.probe("java/lang/ThreadGroup");
javaLangClass = st.probe("java/lang/Class");
javaLangClassLoader = st.probe("java/lang/ClassLoader");
javaLangThrowable = st.probe("java/lang/Throwable");
javaLangObject = st.probe("java/lang/Object");
javaLangCloneable = st.probe("java/lang/Cloneable");
javaIoSerializable = st.probe("java/io/Serializable");
javaLangEnum = st.probe("java/lang/Enum");
}
示例3: writeSymbols
import sun.jvm.hotspot.memory.SymbolTable; //导入依赖的package包/类
private void writeSymbols() throws IOException {
try {
symTbl.symbolsDo(new SymbolTable.SymbolVisitor() {
public void visit(Symbol sym) {
try {
writeSymbol(sym);
} catch (IOException exp) {
throw new RuntimeException(exp);
}
}
});
} catch (RuntimeException re) {
handleRuntimeException(re);
}
}
示例4: FastObjectHeap
import sun.jvm.hotspot.memory.SymbolTable; //导入依赖的package包/类
public FastObjectHeap(TypeDataBase db, SymbolTable symTbl) {
super(db);
Type klassType = db.lookupType("Klass");
klassLayoutHelper = new IntField(klassType.getJIntField("_layout_helper"), 0L);
klassName = klassType.getAddressField("_name");
Type objArrayKlassType = db.lookupType("ObjArrayKlass");
objArrayBottomKlass = objArrayKlassType.getAddressField("_bottom_klass");
Type oopType = db.lookupType("oopDesc");
oopKlass = new MetadataField(oopType.getAddressField("_metadata._klass"), 0L);
oopCompressedKlass = new NarrowKlassField(oopType.getAddressField("_metadata._compressed_klass"), 0L);
Type jlc = db.lookupType("java_lang_Class");
oopKlassOffset = jlc.getCIntegerField("_klass_offset").getValue();
oopArrayKlassOffset = jlc.getCIntegerField("_array_klass_offset").getValue();
javaLangClass = symTbl.probe("java/lang/Class");
try {
Field f = db.getClass().getSuperclass().getDeclaredField("vtblAccess");
f.setAccessible(true);
vtblAccess = (VtblAccess) f.get(db);
klassVtbls = new HashSet<Address>();
for (String type : KLASS_TYPES) {
Address a = vtblAccess.getVtblForType(db.lookupType(type));
if (a == null) {
throw new IllegalStateException();
}
klassVtbls.add(a);
}
instanceMirrorKlassVtbl = vtblAccess.getVtblForType(db.lookupType("InstanceMirrorKlass"));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例5: saSymbolTable
import sun.jvm.hotspot.memory.SymbolTable; //导入依赖的package包/类
SymbolTable saSymbolTable() {
return saSymbolTable;
}