@Test public void testIsSimpleType() { assertTrue(_typeInspector.isSimpleType(Boolean.class)); assertTrue(_typeInspector.isSimpleType(Byte.class)); assertTrue(_typeInspector.isSimpleType(Short.class)); assertTrue(_typeInspector.isSimpleType(Integer.class)); assertTrue(_typeInspector.isSimpleType(Long.class)); assertTrue(_typeInspector.isSimpleType(Double.class)); assertTrue(_typeInspector.isSimpleType(Float.class)); assertTrue(_typeInspector.isSimpleType(Character.class)); assertTrue(_typeInspector.isSimpleType(boolean.class)); assertTrue(_typeInspector.isSimpleType(byte.class)); assertTrue(_typeInspector.isSimpleType(short.class)); assertTrue(_typeInspector.isSimpleType(int.class)); assertTrue(_typeInspector.isSimpleType(long.class)); assertTrue(_typeInspector.isSimpleType(double.class)); assertTrue(_typeInspector.isSimpleType(float.class)); assertTrue(_typeInspector.isSimpleType(char.class)); assertTrue(_typeInspector.isSimpleType(String.class)); assertTrue(_typeInspector.isSimpleType(Date.class)); assertTrue(_typeInspector.isSimpleType(Enum.class)); }
@Override public boolean isSimpleType(Type type) { if (type instanceof Class) { var clazz = (Class)type; for (var simpleClass : _simpleClass) { if (simpleClass.isAssignableFrom(clazz)) return true; } if (clazz.isPrimitive()) { return true; } } else if (type instanceof ParameterizedType) { return isSimpleType(((ParameterizedType) type).getRawType()); } return false; }
JavaTypeInspector implements ITypeInspector { @Override public boolean isSimpleType(Type type) { if (type instanceof Class) { var clazz = (Class)type; for (var simpleClass : _simpleClass) { if (simpleClass.isAssignableFrom(clazz)) return true; } if (clazz.isPrimitive()) { return true; } } else if (type instanceof ParameterizedType) { return isSimpleType(((ParameterizedType) type).getRawType()); } return false; } }
JavaTypeInspector implements ITypeInspector { @Override public boolean isSimpleType(Type type) { if (type instanceof Class) { var clazz = (Class)type; for (var simpleClass : _simpleClass) { if (simpleClass.isAssignableFrom(clazz)) return true; } if (clazz.isPrimitive()) { return true; } } else if (type instanceof ParameterizedType) { return isSimpleType(((ParameterizedType) type).getRawType()); } return false; }  }
JavaTypeInspector implements ITypeInspector { @Override public boolean isSimpleType(Type type) { if (type instanceof Class) { var clazz = (Class)type; for (var simpleClass : _simpleClass) { if (simpleClass.isAssignableFrom(clazz)) return true; } if (clazz.isPrimitive()) { return true; } } else if (type instanceof ParameterizedType) { return isSimpleType(((ParameterizedType) type).getRawType()); } return false; }  @Override boolean isSimpleType(Type type); @Override boolean isCollection(Type type); @Override Type getCollectionComponentType(Type type); @Override boolean isSupport(Type type); }
JavaTypeInspector implements ITypeInspector { @Override public boolean isSimpleType(Type type) { if (type instanceof Class) { var clazz = (Class)type; for (var simpleClass : _simpleClass) { if (simpleClass.isAssignableFrom(clazz)) return true; } if (clazz.isPrimitive()) { return true; } } else if (type instanceof ParameterizedType) { return isSimpleType(((ParameterizedType) type).getRawType()); } return false; }  @Override boolean isSimpleType(Type type); @Override boolean isCollection(Type type); @Override Type getCollectionComponentType(Type type); @Override boolean isSupport(Type type);  }