public boolean isUndefined(int valueNumber) { // TODO: Julian, you seem to be using BOTTOM in the European style. // Steve's code assumes American style (god forbid), so what you're getting // here // is not undefined, but java.lang.Object [NR/EY] if (getVariable(valueNumber) == null) { return true; } TypeAbstraction ta = getVariable(valueNumber).getType(); return ta == BOTTOM || ta.getType() == null; }
public boolean isUndefined(int valueNumber) { // TODO: Julian, you seem to be using BOTTOM in the European style. // Steve's code assumes American style (god forbid), so what you're getting // here // is not undefined, but java.lang.Object [NR/EY] if (getVariable(valueNumber) == null) { return true; } TypeAbstraction ta = getVariable(valueNumber).getType(); return ta == BOTTOM || ta.getType() == null; }
/** * create statements for getConstructor() */ private static SSAInstruction[] makeGetCtorStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_CONSTRUCTOR, null, context, constants); } else { return getParticularMethodStatements(GET_CONSTRUCTOR, getPublicConstructors(cls), context, constants); } }
private static SSAInstruction[] makeGetMethodStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_METHOD, getAllNormalPublicMethods(cls), context, constants); } }
private static SSAInstruction[] makeGetCtorsStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, null, context, constants); } else { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, getPublicConstructors(cls), context, constants); } }
/** * create statements for getConstructor() */ private static SSAInstruction[] makeGetDeclCtorStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_DECLARED_CONSTRUCTOR, null, context, constants); } else { return getParticularMethodStatements(GET_DECLARED_CONSTRUCTOR, getConstructors(cls), context, constants); } }
private static SSAInstruction[] makeGetMethodStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_METHOD, getAllNormalPublicMethods(cls), context, constants); } }
private static SSAInstruction[] makeGetDeclCtorsStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, null, context, constants); } else { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, getConstructors(cls), context, constants); } }
/** * create statements for getDeclaredMethod() */ private static SSAInstruction[] makeGetDeclaredMethodStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_DECLARED_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_DECLARED_METHOD, getDeclaredNormalMethods(cls), context, constants); } }
/** * create statements for getConstructor() */ private static SSAInstruction[] makeGetCtorStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_CONSTRUCTOR, null, context, constants); } else { return getParticularMethodStatements(GET_CONSTRUCTOR, getPublicConstructors(cls), context, constants); } }
private static SSAInstruction[] makeGetMethodsStatments(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_METHODS, null, context, constants); } else { return getMethodArrayStatements(GET_METHODS, getAllNormalPublicMethods(cls), context, constants); } }
private TypeAbstraction interceptType(TypeAbstraction T) { TypeReference type = T.getType().getReference(); if (type.equals(TypeReference.JavaIoSerializable)) { Warnings.add(IgnoreSerializableWarning.create()); return null; } else { return T; } }
private static SSAInstruction[] makeGetDeclCtorsStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, null, context, constants); } else { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, getConstructors(cls), context, constants); } }
private TypeAbstraction interceptType(TypeAbstraction T) { TypeReference type = T.getType().getReference(); if (type.equals(TypeReference.JavaIoSerializable)) { Warnings.add(IgnoreSerializableWarning.create()); return null; } else { return T; } }
/** * Create statements for {@link Class#getDeclaredMethod(String, Class...)}. */ private static SSAInstruction[] makeGetDeclaredMethodStatements(Context context, Map<Integer, ConstantValue> constants,Atom name) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_DECLARED_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_DECLARED_METHOD, getDeclaredNormalMethods(cls,name), context, constants); } }
/** * Create statements for {@link Class#getDeclaredMethod(String, Class...)}. */ private static SSAInstruction[] makeGetDeclaredMethodStatements(Context context, Map<Integer, ConstantValue> constants,Atom name) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_DECLARED_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_DECLARED_METHOD, getDeclaredNormalMethods(cls,name), context, constants); } }
private static SSAInstruction[] makeGetCtorsStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, null, context, constants); } else { return getMethodArrayStatements(GET_DECLARED_CONSTRUCTORS, getPublicConstructors(cls), context, constants); } }
private static SSAInstruction[] makeGetMethodsStatments(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_METHODS, null, context, constants); } else { return getMethodArrayStatements(GET_METHODS, getAllNormalPublicMethods(cls), context, constants); } }
/** * create statements for getDeclaredMethod() */ private static SSAInstruction[] makeGetDeclaredMethodStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getParticularMethodStatements(GET_DECLARED_METHOD, null, context, constants); } else { return getParticularMethodStatements(GET_DECLARED_METHOD, getDeclaredNormalMethods(cls), context, constants); } }
/** * create statements for getDeclaredMethod() */ private static SSAInstruction[] makeGetDeclaredMethodsStatements(Context context, Map<Integer, ConstantValue> constants) { IClass cls = ((TypeAbstraction)context.get(ContextKey.RECEIVER)).getType(); if (cls == null) { return getMethodArrayStatements(GET_DECLARED_METHODS, null, context, constants); } else { return getMethodArrayStatements(GET_DECLARED_METHODS, getDeclaredNormalMethods(cls), context, constants); } }