本文整理了Java中com.thoughtworks.xstream.core.JVM.is15()
方法的一些代码示例,展示了JVM.is15()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JVM.is15()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.core.JVM
类名称:JVM
方法名:is15
暂无
代码示例来源:origin: com.thoughtworks.xstream/xstream
private void init() {
dictionaryEntries = new HashMap();
if (JVM.is15())
try {
fieldUtil = (FieldUtil)JVM.loadClassForName("com.thoughtworks.xstream.converters.reflection.FieldUtil15", true).newInstance();
} catch (Exception e) {
;
}
if (fieldUtil == null)
fieldUtil = new FieldUtil14();
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
protected void validateFieldAccess(Field field) {
if (Modifier.isFinal(field.getModifiers())) {
if (JVM.is15()) {
field.setAccessible(true);
} else {
throw new ObjectAccessException("Invalid final field "
+ field.getDeclaringClass().getName() + "." + field.getName());
}
}
}
代码示例来源:origin: org.jvnet.hudson/xstream
protected void validateFieldAccess(Field field) {
if (Modifier.isFinal(field.getModifiers())) {
if (JVM.is15()) {
field.setAccessible(true);
} else {
throw new ObjectAccessException("Invalid final field "
+ field.getDeclaringClass().getName() + "." + field.getName());
}
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
protected void validateFieldAccess(Field field) {
if (Modifier.isFinal(field.getModifiers())) {
if (JVM.is15()) {
if (!field.isAccessible()) {
field.setAccessible(true);
}
} else {
throw new ObjectAccessException("Invalid final field "
+ field.getDeclaringClass().getName() + "." + field.getName());
}
}
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
protected void validateFieldAccess(Field field) {
if (Modifier.isFinal(field.getModifiers())) {
if (JVM.is15()) {
field.setAccessible(true);
} else {
throw new ObjectAccessException("Invalid final field "
+ field.getDeclaringClass().getName() + "." + field.getName());
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
private void init() {
dictionaryEntries = new HashMap();
if (JVM.is15())
try {
fieldUtil = (FieldUtil)JVM.loadClassForName("com.thoughtworks.xstream.converters.reflection.FieldUtil15", true).newInstance();
} catch (Exception e) {
;
}
if (fieldUtil == null)
fieldUtil = new FieldUtil14();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
private void init() {
dictionaryEntries = new HashMap();
if (JVM.is15())
try {
fieldUtil = (FieldUtil)JVM.loadClassForName("com.thoughtworks.xstream.converters.reflection.FieldUtil15", true).newInstance();
} catch (Exception e) {
;
}
if (fieldUtil == null)
fieldUtil = new FieldUtil14();
}
代码示例来源:origin: apache/servicemix-bundles
private void init() {
dictionaryEntries = new HashMap();
if (JVM.is15())
try {
fieldUtil = (FieldUtil)JVM.loadClassForName("com.thoughtworks.xstream.converters.reflection.FieldUtil15", true).newInstance();
} catch (Exception e) {
;
}
if (fieldUtil == null)
fieldUtil = new FieldUtil14();
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
enumMapper = JVM.is15() ? UseAttributeForEnumMapper.createEnumMapper(mapper) : null;
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
this.valueAsAttribute = valueAsAttribute;
this.lookup = lookup;
enumMapper = JVM.is15() ? UseAttributeForEnumMapper.createEnumMapper(mapper) : null;
代码示例来源:origin: com.haulmont.thirdparty/xstream
if (JVM.is15()) {
aliasDynamically("duration", "javax.xml.datatype.Duration");
alias("enum-set", jvm.loadClass("java.util.EnumSet"));
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
if (JVM.is15()) {
aliasDynamically("duration", "javax.xml.datatype.Duration");
alias("concurrent-hash-map", JVM.loadClassForName("java.util.concurrent.ConcurrentHashMap"));
代码示例来源:origin: org.jvnet.hudson/xstream
if (JVM.is15()) {
alias("duration", jvm.loadClass("javax.xml.datatype.Duration"));
alias("enum-set", jvm.loadClass("java.util.EnumSet"));
代码示例来源:origin: ovea-deprecated/jetty-session-redis
if (JVM.is15()) {
alias("duration", jvm.loadClass("javax.xml.datatype.Duration"));
alias("enum-set", jvm.loadClass("java.util.EnumSet"));
代码示例来源:origin: com.haulmont.thirdparty/xstream
if (JVM.is15()) {
代码示例来源:origin: org.jvnet.hudson/xstream
if (JVM.is15()) {
代码示例来源:origin: org.jvnet.hudson/xstream
mapper = new DefaultImplementationsMapper(mapper);
mapper = new AttributeMapper(mapper, converterLookup);
if (JVM.is15()) {
mapper = buildMapperDynamically(
"com.thoughtworks.xstream.mapper.EnumMapper", new Class[]{Mapper.class},
if (JVM.is15()) {
mapper = buildMapperDynamically(
ANNOTATION_MAPPER_TYPE,
代码示例来源:origin: com.haulmont.thirdparty/xstream
mapper = new DefaultImplementationsMapper(mapper);
mapper = new AttributeMapper(mapper, converterLookup, reflectionProvider);
if (JVM.is15()) {
mapper = buildMapperDynamically(
"com.thoughtworks.xstream.mapper.EnumMapper", new Class[]{Mapper.class},
if (JVM.is15()) {
mapper = buildMapperDynamically(ANNOTATION_MAPPER_TYPE, new Class[]{
Mapper.class, ConverterRegistry.class, ConverterLookup.class,
代码示例来源:origin: ovea-deprecated/jetty-session-redis
mapper = new DefaultImplementationsMapper(mapper);
mapper = new AttributeMapper(mapper, converterLookup);
if (JVM.is15()) {
mapper = buildMapperDynamically(
"com.thoughtworks.xstream.mapper.EnumMapper", new Class[]{Mapper.class},
if (JVM.is15()) {
mapper = buildMapperDynamically(
ANNOTATION_MAPPER_TYPE,
代码示例来源:origin: org.codehaus.fabric3/fabric3-marshal-xstream
private Mapper buildMapper(ClassLoader cl) {
// method exists to replace the default Mapper with the ClassLoaderMapper
Mapper mapper = new ClassLoaderMapper(registry, cl);
// note do not use XStream11XmlFriendlyMapper
mapper = new ClassAliasingMapper(mapper);
mapper = new FieldAliasingMapper(mapper);
mapper = new AttributeAliasingMapper(mapper);
mapper = new AttributeMapper(mapper);
mapper = new ImplicitCollectionMapper(mapper);
mapper = new DynamicProxyMapper(mapper);
if (JVM.is15()) {
mapper = new EnumMapper(mapper);
}
mapper = new OuterClassMapper(mapper);
mapper = new ArrayMapper(mapper);
mapper = new DefaultImplementationsMapper(mapper);
mapper = new ImmutableTypesMapper(mapper);
mapper = new CachingMapper(mapper);
return mapper;
}
内容来源于网络,如有侵权,请联系作者删除!