public static String asString(ArrayType atype) { Type obj = atype.getBasicType(); String result = GenericUtilities.getString(obj); return result + Util.repeat("[]", atype.getDimensions()); } }
public static double isDeepSerializable(ReferenceType type) throws ClassNotFoundException { if (type instanceof ArrayType) { ArrayType a = (ArrayType) type; Type t = a.getBasicType(); if (t instanceof ReferenceType) { type = (ReferenceType) t; } else { return 1.0; } } double result = isDeepSerializable(type.getSignature()); if (type instanceof GenericObjectType && Subtypes2.isContainer(type)) { GenericObjectType gt = (GenericObjectType) type; List<? extends ReferenceType> parameters = gt.getParameters(); if (parameters != null) { for(ReferenceType t : parameters) { double r = isDeepSerializable(t); if (result > r) { result = r; } } } } return result; } public static ReferenceType getLeastSerializableTypeComponent(ReferenceType type)
assert aArrType.getDimensions() == bArrType.getDimensions(); Type aBaseType = aArrType.getBasicType(); Type bBaseType = bArrType.getBasicType(); boolean aBaseIsObjectType = (aBaseType instanceof ObjectType); boolean bBaseIsObjectType = (bBaseType instanceof ObjectType);
assert aArrType.getDimensions() != bArrType.getDimensions(); boolean aBaseTypeIsPrimitive = (aArrType.getBasicType() instanceof BasicType); boolean bBaseTypeIsPrimitive = (bArrType.getBasicType() instanceof BasicType);
public static ReferenceType getLeastSerializableTypeComponent(ReferenceType type) throws ClassNotFoundException { if (type instanceof ArrayType) { ArrayType a = (ArrayType) type; Type t = a.getBasicType(); if (t instanceof ReferenceType) { type = (ReferenceType) t; } else { return type; } } ReferenceType result = type; double value = isDeepSerializable(type.getSignature()); if (type instanceof GenericObjectType && Subtypes2.isContainer(type)) { GenericObjectType gt = (GenericObjectType) type; List<? extends ReferenceType> parameters = gt.getParameters(); if (parameters != null) { for(ReferenceType t : parameters) { double r = isDeepSerializable(t); if (value > r) { value = r; result = getLeastSerializableTypeComponent(t); } } } } return result; }
return compareTypes(parmArray.getBasicType(), argArray.getBasicType(), ignoreBaseType);
return false; Type possibleSupertypeBasicType = possibleSupertypeAsArrayType.getBasicType(); if (!(possibleSupertypeBasicType instanceof ObjectType)) { return false; Type typeBasicType = typeAsArrayType.getBasicType();
private static boolean isObjectType(Type type) { return ((ArrayType) type).getBasicType() instanceof ObjectType; }
private static boolean isObjectType(Type type) { return ((ArrayType) type).getBasicType() instanceof ObjectType; }
@Override public ObjectType getLoadClassType( final ConstantPoolGen cpg ) { Type t = getType(cpg); if (t instanceof ArrayType) { t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType) ? (ObjectType) t : null; } }
public ObjectType getLoadClassType(ConstantPoolGen cpg) { Type t = getType(cpg); if(t instanceof ArrayType) t = ((ArrayType) t).getBasicType(); return (t instanceof ObjectType)? (ObjectType) t : null; }
@Override public ObjectType getLoadClassType( final ConstantPoolGen cpg ) { Type t = getType(cpg); if (t instanceof ArrayType) { t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType) ? (ObjectType) t : null; }
@Override public ObjectType getLoadClassType( final ConstantPoolGen cpg ) { Type t = getType(cpg); if (t instanceof ArrayType) { t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType) ? (ObjectType) t : null; }
@Override public ObjectType getLoadClassType( final ConstantPoolGen cpg ) { Type t = getType(cpg); if (t instanceof ArrayType) { t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType) ? (ObjectType) t : null; }
public ObjectType getLoadClassType(ConstantPoolGen cpg) { Type t = getType(cpg); if (t instanceof ArrayType){ t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType)? (ObjectType) t : null; }
public ObjectType getLoadClassType(ConstantPoolGen cpg) { Type t = getType(cpg); if (t instanceof ArrayType){ t = ((ArrayType) t).getBasicType(); } return (t instanceof ObjectType)? (ObjectType) t : null; } }
public ObjectType getLoadClassType(ConstantPoolGen cpg) { Type t = getType(cpg); if(t instanceof ArrayType) t = ((ArrayType) t).getBasicType(); return (t instanceof ObjectType)? (ObjectType) t : null; }
public static String asString(ArrayType atype) { Type obj = atype.getBasicType(); String result = GenericUtilities.getString(obj); return result + Util.repeat("[]", atype.getDimensions()); } }
/** * Ensures the specific preconditions of the said instruction. */ public void visitDALOAD(DALOAD o){ indexOfInt(o, stack().peek()); if (stack().peek(1) == Type.NULL){ return; } if (! (stack().peek(1) instanceof ArrayType)){ constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'."); } Type t = ((ArrayType) (stack().peek(1))).getBasicType(); if (t != Type.DOUBLE){ constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'."); } }
/** * Ensures the specific preconditions of the said instruction. */ public void visitSALOAD(SALOAD o){ indexOfInt(o, stack().peek()); if (stack().peek(1) == Type.NULL){ return; } if (! (stack().peek(1) instanceof ArrayType)){ constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'."); } Type t = ((ArrayType) (stack().peek(1))).getBasicType(); if (t != Type.SHORT){ constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'."); } }