public static boolean canConvert(Class toType, Class convertFrom) { if (isAssignableFrom(toType, convertFrom)) return true; if (CONVERTERS.containsKey(toType)) { return CONVERTERS.get(toType).canConvertFrom(toNonPrimitiveType(convertFrom)); } else if (toType.isArray() && canConvert(toType.getComponentType(), convertFrom)) { return true; } return false; }
public static boolean canConvert(Class toType, Class convertFrom) { if (isAssignableFrom(toType, convertFrom)) return true; if (CONVERTERS.containsKey(toType)) { return CONVERTERS.get(toType).canConvertFrom(toNonPrimitiveType(convertFrom)); } else if (toType.isArray() && canConvert(toType.getComponentType(), convertFrom)) { return true; } return false; }
private void visitConstantClass(Class<?> clazz) { if (clazz == null) clazz = Object.class; if (clazz.isPrimitive()) { mv.visitFieldInsn(GETSTATIC, toNonPrimitiveType(clazz).getName().replace(".", "/"), "TYPE", "Ljava/lang/Class;"); } else { mv.visitLdcInsn(org.mvel2.asm.Type.getType(clazz)); } }
private void visitConstantClass(Class<?> clazz) { if (clazz == null) clazz = Object.class; if (clazz.isPrimitive()) { mv.visitFieldInsn(GETSTATIC, toNonPrimitiveType(clazz).getName().replace(".", "/"), "TYPE", "Ljava/lang/Class;"); } else { mv.visitLdcInsn(org.mvel2.asm.Type.getType(clazz)); } }
currType = toNonPrimitiveType(((Field) member).getType()); return ((Field) member).get(ctx);
currType = toNonPrimitiveType(returnType); return o;
currType = toNonPrimitiveType(((Field) member).getType()); return ((Field) member).get(ctx);
currType = toNonPrimitiveType(returnType); return o;
currType = toNonPrimitiveType(m.getReturnType()); try { return m.invoke(ctx, normalizeArgsForVarArgs(parameterTypes, args, m.isVarArgs()));
currType = toNonPrimitiveType(m.getReturnType()); try { return m.invoke(ctx, normalizeArgsForVarArgs(parameterTypes, args, m.isVarArgs()));
currType = toNonPrimitiveType(method.getReturnType()); return o;
currType = toNonPrimitiveType(method.getReturnType()); return o;
currType = toNonPrimitiveType(returnType); return o;
currType = toNonPrimitiveType(returnType); return o;
currType = toNonPrimitiveType(m.getReturnType()); return o;
currType = toNonPrimitiveType(m.getReturnType()); return o;
currType = toNonPrimitiveType(((Method) member).getReturnType()); return o; currType = toNonPrimitiveType(f.getType()); return o;
currType = toNonPrimitiveType(((Method) member).getReturnType()); return o; currType = toNonPrimitiveType(f.getType()); return o;