本文整理匯總了Java中com.sun.max.vm.actor.member.FieldActor類的典型用法代碼示例。如果您正苦於以下問題:Java FieldActor類的具體用法?Java FieldActor怎麽用?Java FieldActor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FieldActor類屬於com.sun.max.vm.actor.member包,在下文中一共展示了FieldActor類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initOptionalSupportFields
import com.sun.max.vm.actor.member.FieldActor; //導入依賴的package包/類
@SUBSTITUTE
private static void initOptionalSupportFields() {
try {
final Class<?> klass = Class.forName("sun.management.VMManagementImpl");
final Object staticTuple = ClassActor.fromJava(klass).staticTuple();
final Field[] fields = klass.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
final Field field = fields[i];
final String fieldName = field.getName();
if (fieldName.endsWith("Support")) {
FieldActor.fromJava(field).setBoolean(staticTuple, isSupported(fieldName));
}
}
} catch (Exception ex) {
VEError.unexpected("problem initializing sun.management.VMManagementImpl " + ex);
}
}
示例2: doClass
import com.sun.max.vm.actor.member.FieldActor; //導入依賴的package包/類
@Override
public boolean doClass(ClassActor classActor) {
MaxSimInterface.ClassInfo.Kind kind = classActorToTypeKind(classActor);
int classId = UnsafeCast.asInt(classActor.getMaxSimTag());
if (classId > maxClassInfoId) {
maxClassInfoId = classId;
}
classInfo.clear();
classInfo.setId(classId);
classInfo.setDesc(classActor.name());
classInfo.setKind(kind);
if (kind == MaxSimInterface.ClassInfo.Kind.ARRAY) {
classInfo.setComponentId(UnsafeCast.asInt(classActor.componentClassActor().getMaxSimTag()));
} else if (kind == MaxSimInterface.ClassInfo.Kind.TUPLE ||
kind == MaxSimInterface.ClassInfo.Kind.HYBRID) {
ClassActor currentClassActor = classActor;
do {
for (FieldActor fieldActor : currentClassActor.localInstanceFieldActors()) {
if (!(fieldActor.descriptor().isResolvableWithoutClassLoading(fieldActor.holder().classLoader)) &&
!(fieldActor instanceof InjectedFieldActor)) {
continue;
}
fieldInfo.clear();
fieldInfo.setName(fieldActor.name());
fieldInfo.setOffset(fieldActor.offset());
fieldInfo.setClassId(UnsafeCast.asInt(fieldActor.type().getMaxSimTag()));
if (fieldActor.isFinal()) {
fieldInfo.addProperty(MaxSimInterface.FieldInfo.Property.FINAL);
}
classInfo.addFieldInfo(fieldInfo);
}
currentClassActor = currentClassActor.superClassActor;
} while (currentClassActor != null);
}
maxineInfo.addClassInfo(classInfo);
return true;
}
示例3: staticFieldOffset
import com.sun.max.vm.actor.member.FieldActor; //導入依賴的package包/類
/**
* Gets the offset of a declared static field from the start of its class.
* @see Unsafe#staticFieldOffset(Field)
* @param field the field for which to get offset
* @return the offset for the field from the beginning of its class's static fields
*/
@SUBSTITUTE
public long staticFieldOffset(Field field) {
return FieldActor.fromJava(field).offset();
}
示例4: objectFieldOffset
import com.sun.max.vm.actor.member.FieldActor; //導入依賴的package包/類
/**
* Gets the offset of a declared field from the start of an object of its type.
* @see Unsafe#objectFieldOffset(Field)
* @param field the field for which to get offset
* @return the offset for the field from the beginning of an object of the appropriate type
*/
@SUBSTITUTE
public long objectFieldOffset(Field field) {
return FieldActor.fromJava(field).offset();
}
示例5: staticFieldBase
import com.sun.max.vm.actor.member.FieldActor; //導入依賴的package包/類
/**
* Gets the base address for static fields.
* @see Unsafe#staticFieldBase(Field)
* @param field the field for which to get the base
* @return an address representing the base for a static field's offset
*/
@SUBSTITUTE
public Object staticFieldBase(Field field) {
return FieldActor.fromJava(field).holder().staticTuple();
}