public static List<TypeType> gatherTypes(Object... list) { List<TypeType> types = new ArrayList(); for (Object o : list) { types.add(TypeType.getInstanceType(o)); } return types; }
public Schema getSchemaWithComponentClass(final Class<?> cls, Class<?> componentClass) { Schema schema = mappings.get(cls); if (schema != null) { return schema; } if (cls != null) { TypeType type = TypeType.getType(cls); if (type.isArray()) { final Schema componentSchema = Schema.definitionRef(cls.getComponentType().getSimpleName(), ""); return Schema.array(componentSchema, ""); } else if (type.isCollection()) { if (componentClass != null) { if (componentClass.getName().startsWith("java.lang")) { final Schema schemaForComponent = mappings.get(componentClass); return Schema.array(schemaForComponent, ""); } else { return Schema.array(Schema.definitionRef(componentClass.getSimpleName(), ""), ""); } } else { logger.info("Component class was null defaulting to string"); return Schema.array(Schema.definitionRef("string", ""), ""); } } return Schema.definitionRef(cls.getSimpleName(), ""); } else { return Schema.schema("string"); } }
public boolean hasLength ( ) { switch ( this ) { case LIST: case MAP: case STRING: case CHAR_SEQUENCE: case SET: case COLLECTION: return true; default: return this.isArray() || this.isCollection(); } }
public static List<Object> gatherTypes(List<?> list) { List<Object> types = new ArrayList<>(); for (Object o : list) { if (o instanceof List) { types.add(gatherTypes((List) o)); } else { types.add(TypeType.getInstanceType(o)); } } return types; }
final TypeType parameterType = TypeType.getType(parameterClass); final TypeType itemType = TypeType.getInstanceType(item);
public static TypeType getType(Class<?> clazz, Object object) { TypeType type = getType(className); type = ENUM; } else if (clazz.isArray()) { type = getArrayType(clazz); } else if (Typ.isAbstract(clazz)) { type = ABSTRACT;
buf.add(gatherTypes(convertedArguments)).addLine(); buf.add(gatherActualTypes(convertedArguments)).addLine(); buf.add(gatherTypes(convertedArguments)).addLine(); buf.add(gatherActualTypes(convertedArguments)).addLine(); return ( T ) handle(Object.class, e, "\nlist args after conversion", convertedArguments, "types", gatherTypes(convertedArguments), "\noriginal args", argList, "original types", gatherTypes(argList));
public boolean isCollection() { switch (this) { case LIST: case SET: case COLLECTION: return true; default: if (baseTypeOrWrapper == null) { return false; } else { return baseTypeOrWrapper.isCollection(); } } }
public static List<Object> gatherActualTypes(List<?> list) { List<Object> types = new ArrayList<>(); for (Object o : list) { if (o instanceof List) { types.add(gatherActualTypes((List) o)); } else { types.add(TypeType.getActualType(o)); } } return types; }
default boolean isArray() { return typeEnum().isArray(); }
"\noriginal args\n", argsList, "\nlist args after conversion", finalArgs, "\nconverted types\n", gatherTypes(finalArgs), "original types\n", gatherTypes(argsList), "\n"); } else { return handle(Object.class, ex, "\nlist args after conversion", finalArgs, "types", gatherTypes(finalArgs), "\noriginal args", argsList, "original types\n", gatherTypes(argsList), "\n");
final TypeType parameterType = TypeType.getType(parameterClass); final TypeType itemType = TypeType.getInstanceType(item);
public static TypeType getType ( Class<?> clazz, Object object ) { TypeType type = getType( className ); type = ENUM; } else if (clazz.isArray()) { type = getArrayType(clazz); } else if (Typ.isAbstract(clazz)) { type = ABSTRACT;
public static List<Object> gatherTypes ( List<?> list ) { List<Object> types = new ArrayList<>(); for (Object o : list) { if (o instanceof List) { types.add(gatherTypes((List) o)); } else { types.add(TypeType.getInstanceType(o)); } } return types; }
public boolean hasLength() { switch (this) { case LIST: case MAP: case STRING: case CHAR_SEQUENCE: case SET: case COLLECTION: return true; default: return this.isArray() || this.isCollection(); } }
buf.add(gatherTypes(convertedArguments)).addLine(); buf.add(gatherActualTypes(convertedArguments)).addLine(); buf.add(gatherTypes(convertedArguments)).addLine(); buf.add(gatherActualTypes(convertedArguments)).addLine(); return ( T ) handle(Object.class, e, "\nlist args after conversion", convertedArguments, "types", gatherTypes(convertedArguments), "\noriginal args", argList, "original types", gatherTypes(argList));
default boolean isCollection() { return typeEnum().isCollection(); }