本文整理了Java中serp.bytecode.BCClass.<init>()
方法的一些代码示例,展示了BCClass.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BCClass.<init>()
方法的具体详情如下:
包路径:serp.bytecode.BCClass
类名称:BCClass
方法名:<init>
[英]Hide constructor. For use by the owning project only.
[中]隐藏构造函数。仅供所属项目使用。
代码示例来源:origin: org.apache.openjpa/openjpa-all
return cached;
BCClass ret = new BCClass(this);
if (type.isPrimitive())
ret.setState(new PrimitiveState(type, _names));
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Load the bytecode from the given stream.
* If this project already contains the class in the given stream,
* it will be returned. Otherwise a new {@link BCClass} will be created
* from the given bytecode.
*
* @throws RuntimeException on parse error
*/
public BCClass loadClass(InputStream in, ClassLoader loader) {
BCClass ret = new BCClass(this);
ret.setState(new ObjectState(_names));
try {
ret.read(in, loader);
} catch (IOException ioe) {
throw new RuntimeException(ioe.toString());
}
String name = ret.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
cache(name, ret);
return ret;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Load the bytecode from the given class file.
* If this project already contains the class in the given file, it will
* be returned. Otherwise a new {@link BCClass} will be created from the
* given bytecode.
*
* @throws RuntimeException on parse error
*/
public BCClass loadClass(File classFile, ClassLoader loader) {
// parse the bytecode from the file
BCClass ret = new BCClass(this);
ret.setState(new ObjectState(_names));
try {
ret.read(classFile, loader);
} catch (IOException ioe) {
throw new RuntimeException(ioe.toString());
}
String name = ret.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
cache(name, ret);
return ret;
}
代码示例来源:origin: net.sourceforge.serp/serp
return cached;
BCClass ret = new BCClass(this);
if (type.isPrimitive())
ret.setState(new PrimitiveState(type, _names));
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Load the bytecode from the given stream.
* If this project already contains the class in the given stream,
* it will be returned. Otherwise a new {@link BCClass} will be created
* from the given bytecode.
*
* @throws RuntimeException on parse error
*/
public BCClass loadClass(InputStream in, ClassLoader loader) {
BCClass ret = new BCClass(this);
ret.setState(new ObjectState(_names));
try {
ret.read(in, loader);
} catch (IOException ioe) {
throw new RuntimeException(ioe.toString());
}
String name = ret.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
cache(name, ret);
return ret;
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Load the bytecode from the given class file.
* If this project already contains the class in the given file, it will
* be returned. Otherwise a new {@link BCClass} will be created from the
* given bytecode.
*
* @throws RuntimeException on parse error
*/
public BCClass loadClass(File classFile, ClassLoader loader) {
// parse the bytecode from the file
BCClass ret = new BCClass(this);
ret.setState(new ObjectState(_names));
try {
ret.read(classFile, loader);
} catch (IOException ioe) {
throw new RuntimeException(ioe.toString());
}
String name = ret.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
cache(name, ret);
return ret;
}
代码示例来源:origin: net.sourceforge.serp/serp
BCClass ret = new BCClass(this);
if (componentName != null)
ret.setState(new ArrayState(name, componentName));
代码示例来源:origin: org.apache.openjpa/openjpa-all
BCClass ret = new BCClass(this);
if (componentName != null)
ret.setState(new ArrayState(name, componentName));
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Import the given bytecode from another project. If a {@link BCClass}
* with the same name already exists in this project, it will be returned.
* Otherwise, a new {@link BCClass} will be created from the
* information in the given class.
*/
public BCClass loadClass(BCClass bc) {
String name = bc.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
BCClass ret = new BCClass(this);
if (bc.isPrimitive())
ret.setState(new PrimitiveState(bc.getType(), _names));
else if (bc.isArray())
ret.setState(new ArrayState(bc.getName(), bc.getComponentName()));
else {
ret.setState(new ObjectState(_names));
ret.read(bc);
}
cache(name, ret);
return ret;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Import the given bytecode from another project. If a {@link BCClass}
* with the same name already exists in this project, it will be returned.
* Otherwise, a new {@link BCClass} will be created from the
* information in the given class.
*/
public BCClass loadClass(BCClass bc) {
String name = bc.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
BCClass ret = new BCClass(this);
if (bc.isPrimitive())
ret.setState(new PrimitiveState(bc.getType(), _names));
else if (bc.isArray())
ret.setState(new ArrayState(bc.getName(), bc.getComponentName()));
else {
ret.setState(new ObjectState(_names));
ret.read(bc);
}
cache(name, ret);
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!