本文整理了Java中serp.bytecode.BCClass.setMajorVersion()
方法的一些代码示例,展示了BCClass.setMajorVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BCClass.setMajorVersion()
方法的具体详情如下:
包路径:serp.bytecode.BCClass
类名称:BCClass
方法名:setMajorVersion
[英]Set the major version of the bytecode spec used for this class. JVMs are only required to operate with versions that they understand; leaving the default value of Constants#MAJOR_VERSION is safe.
[中]设置用于此类的字节码规范的主要版本。JVM只需要使用其理解的版本进行操作;保留常量的默认值#MAJOR_VERSION是安全的。
代码示例来源:origin: net.sourceforge.serp/serp
/**
* When adding annotations, make sure the bytecode spec supports them.
*/
private void ensureBytecodeVersion() {
BCClass bc = getBCClass();
if (bc.getMajorVersion() < Constants.MAJOR_VERSION_JAVA5) {
bc.setMajorVersion(Constants.MAJOR_VERSION_JAVA5);
bc.setMinorVersion(Constants.MINOR_VERSION_JAVA5);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* When adding annotations, make sure the bytecode spec supports them.
*/
private void ensureBytecodeVersion() {
BCClass bc = getBCClass();
if (bc.getMajorVersion() < Constants.MAJOR_VERSION_JAVA5) {
bc.setMajorVersion(Constants.MAJOR_VERSION_JAVA5);
bc.setMinorVersion(Constants.MINOR_VERSION_JAVA5);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* When adding class entries, make sure the bytecode spec supports them.
*/
private void ensureBytecodeVersion() {
BCClass bc = getCode().getMethod().getDeclarer();
if (bc.getMajorVersion() < Constants.MAJOR_VERSION_JAVA5) {
bc.setMajorVersion(Constants.MAJOR_VERSION_JAVA5);
bc.setMinorVersion(Constants.MINOR_VERSION_JAVA5);
}
}
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* When adding class entries, make sure the bytecode spec supports them.
*/
private void ensureBytecodeVersion() {
BCClass bc = getCode().getMethod().getDeclarer();
if (bc.getMajorVersion() < Constants.MAJOR_VERSION_JAVA5) {
bc.setMajorVersion(Constants.MAJOR_VERSION_JAVA5);
bc.setMinorVersion(Constants.MINOR_VERSION_JAVA5);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!