本文整理了Java中org.apache.bcel.generic.NEW.getType()
方法的一些代码示例,展示了NEW.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NEW.getType()
方法的具体详情如下:
包路径:org.apache.bcel.generic.NEW
类名称:NEW
方法名:getType
暂无
代码示例来源:origin: spotbugs/spotbugs
@Override
public void visitNEW(NEW obj) {
// FIXME: type is technically "uninitialized"
// However, we don't model that yet.
pushValue(obj.getType(getCPG()));
// We now have an exact type for this value.
setTopOfStackIsExact();
}
代码示例来源:origin: org.apache.bcel/bcel
@Override
public ObjectType getLoadClassType( final ConstantPoolGen cpg ) {
return (ObjectType) getType(cpg);
}
代码示例来源:origin: bcel/bcel
public ObjectType getLoadClassType(ConstantPoolGen cpg) {
return (ObjectType)getType(cpg);
}
代码示例来源:origin: bcel/bcel
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
public void visitNEW(NEW o){
stack().push(new UninitializedObjectType((ObjectType) (o.getType(cpg))));
}
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
代码示例来源:origin: com.google.code.findbugs/findbugs
@Override
public void visitNEW(NEW obj) {
// FIXME: type is technically "uninitialized"
// However, we don't model that yet.
pushValue(obj.getType(getCPG()));
// We now have an exact type for this value.
setTopOfStackIsExact();
}
代码示例来源:origin: org.apache.bcel/bcel
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
@Override
public void visitNEW(final NEW o) {
stack().push(new UninitializedObjectType((ObjectType) (o.getType(cpg))));
}
/** Symbolically executes the corresponding Java Virtual Machine instruction. */
代码示例来源:origin: bcel/bcel
/**
* Ensures the specific preconditions of the said instruction.
*/
public void visitNEW(NEW o){
//visitCPInstruction(CPInstruction) has been called before.
//visitLoadClass(LoadClass) has been called before.
Type t = o.getType(cpg);
if (! (t instanceof ReferenceType)){
throw new AssertionViolatedException("NEW.getType() returning a non-reference type?!");
}
if (! (t instanceof ObjectType)){
constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+t+"'.");
}
ObjectType obj = (ObjectType) t;
//e.g.: Don't instantiate interfaces
if (! obj.referencesClass()){
constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+obj+"'.");
}
}
代码示例来源:origin: org.apache.bcel/bcel
/**
* Ensures the specific preconditions of the said instruction.
*/
@Override
public void visitNEW(final NEW o) {
//visitCPInstruction(CPInstruction) has been called before.
//visitLoadClass(LoadClass) has been called before.
final Type t = o.getType(cpg);
if (! (t instanceof ReferenceType)) {
throw new AssertionViolatedException("NEW.getType() returning a non-reference type?!");
}
if (! (t instanceof ObjectType)) {
constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+t+"'.");
}
final ObjectType obj = (ObjectType) t;
//e.g.: Don't instantiate interfaces
try {
if (! obj.referencesClassExact()) {
constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+obj+"'.");
}
} catch (final ClassNotFoundException e) {
constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+obj+"'." + " which threw " + e);
}
}
内容来源于网络,如有侵权,请联系作者删除!