/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ @Override public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
public boolean isAssignableTo(Type type) { if (eq(type.getCtClass(), Type.OBJECT.getCtClass())) return true; if (eq(type.getCtClass(), Type.CLONEABLE.getCtClass())) return true; if (eq(type.getCtClass(), Type.SERIALIZABLE.getCtClass())) return true; if (! type.isArray()) return false; Type typeRoot = getRootComponent(type); int typeDims = type.getDimensions(); if (typeDims > dims) return false; if (typeDims < dims) { if (eq(typeRoot.getCtClass(), Type.OBJECT.getCtClass())) return true; if (eq(typeRoot.getCtClass(), Type.CLONEABLE.getCtClass())) return true; if (eq(typeRoot.getCtClass(), Type.SERIALIZABLE.getCtClass())) return true; return false; } return component.isAssignableTo(typeRoot); }
public boolean isAssignableTo(Type type) { if (eq(type.getCtClass(), Type.OBJECT.getCtClass())) return true; if (eq(type.getCtClass(), Type.CLONEABLE.getCtClass())) return true; if (eq(type.getCtClass(), Type.SERIALIZABLE.getCtClass())) return true; if (! type.isArray()) return false; Type typeRoot = getRootComponent(type); int typeDims = type.getDimensions(); if (typeDims > dims) return false; if (typeDims < dims) { if (eq(typeRoot.getCtClass(), Type.OBJECT.getCtClass())) return true; if (eq(typeRoot.getCtClass(), Type.CLONEABLE.getCtClass())) return true; if (eq(typeRoot.getCtClass(), Type.SERIALIZABLE.getCtClass())) return true; return false; } return component.isAssignableTo(typeRoot); }
private Map mergeMultiAndSingle(MultiType multi, Type single) { Map map1 = getAllMultiInterfaces(multi); Map map2 = getAllInterfaces(single.getCtClass(), null); return findCommonInterfaces(map1, map2); }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private Map<String,CtClass> mergeMultiAndSingle(MultiType multi, Type single) { Map<String,CtClass> map1 = getAllMultiInterfaces(multi); Map<String,CtClass> map2 = getAllInterfaces(single.getCtClass(), null); return findCommonInterfaces(map1, map2); }
private void evalNewObjectArray(int pos, CodeIterator iter, Frame frame) throws BadBytecode { // Convert to x[] format Type type = resolveClassInfo(constPool.getClassInfo(iter.u16bitAt(pos + 1))); String name = type.getCtClass().getName(); int opcode = iter.byteAt(pos); int dimensions; if (opcode == MULTIANEWARRAY) { dimensions = iter.byteAt(pos + 3); } else { name = name + "[]"; dimensions = 1; } while (dimensions-- > 0) { verifyAssignable(Type.INTEGER, simplePop(frame)); } simplePush(getType(name), frame); }
private void evalNewObjectArray(int pos, CodeIterator iter, Frame frame) throws BadBytecode { // Convert to x[] format Type type = resolveClassInfo(constPool.getClassInfo(iter.u16bitAt(pos + 1))); String name = type.getCtClass().getName(); int opcode = iter.byteAt(pos); int dimensions; if (opcode == MULTIANEWARRAY) { dimensions = iter.byteAt(pos + 3); } else { name = name + "[]"; dimensions = 1; } while (dimensions-- > 0) { verifyAssignable(Type.INTEGER, simplePop(frame)); } simplePush(getType(name), frame); }
/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
/** * Gets the class that corresponds with this type. If this information * is not yet known, java.lang.Object will be returned. */ public CtClass getCtClass() { if (resolved != null) return resolved.getCtClass(); return Type.OBJECT.getCtClass(); }
private Map mergeMultiAndSingle(MultiType multi, Type single) { Map map1 = getAllMultiInterfaces(multi); Map map2 = getAllInterfaces(single.getCtClass(), null); return findCommonInterfaces(map1, map2); }
private Map mergeMultiAndSingle(MultiType multi, Type single) { Map map1 = getAllMultiInterfaces(multi); Map map2 = getAllInterfaces(single.getCtClass(), null); return findCommonInterfaces(map1, map2); }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private Map mergeMultiAndSingle(MultiType multi, Type single) { Map map1 = getAllMultiInterfaces(multi); Map map2 = getAllInterfaces(single.getCtClass(), null); return findCommonInterfaces(map1, map2); }