private void testSubComponent(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Primitive) { testPrimitive((Primitive) type, handler, l); } else if (type instanceof Varies) { testSubComponent(((Varies) type).getData(), handler, l); } }
private void testSubComponent(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Primitive) { testPrimitive((Primitive) type, handler, l); } else if (type instanceof Varies) { testSubComponent(((Varies) type).getData(), handler, l); } }
private void testType(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Composite) { Type[] components = ((Composite) type).getComponents(); for (int comp = 0; comp < components.length; comp++) { Location location = new Location(l).withComponent(comp + 1); testComponent(components[comp], handler, location); } } else if (type instanceof Varies) { testType(((Varies) type).getData(), handler, l); } else { testPrimitive((Primitive) type, handler, l); } }
private void testComponent(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Composite) { Type[] component = ((Composite) type).getComponents(); for (int sub = 0; sub < component.length; sub++) { Location location = new Location(l).withSubcomponent(sub + 1); testSubComponent(component[sub], handler, location); } } else if (type instanceof Varies) { testComponent(((Varies) type).getData(), handler, l); } else { testPrimitive((Primitive) type, handler, l); } }
private void testComponent(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Composite) { Type[] component = ((Composite) type).getComponents(); for (int sub = 0; sub < component.length; sub++) { Location location = new Location(l).withSubcomponent(sub + 1); testSubComponent(component[sub], handler, location); } } else if (type instanceof Varies) { testComponent(((Varies) type).getData(), handler, l); } else { testPrimitive((Primitive) type, handler, l); } }
private void testType(Type type, ValidationExceptionHandler<R> handler, Location l) { if (type instanceof Composite) { Type[] components = ((Composite) type).getComponents(); for (int comp = 0; comp < components.length; comp++) { Location location = new Location(l).withComponent(comp + 1); testComponent(components[comp], handler, location); } } else if (type instanceof Varies) { testType(((Varies) type).getData(), handler, l); } else { testPrimitive((Primitive) type, handler, l); } }