@Test public void testGenerate1Resource() throws Exception { WADLGenerator generator = new WADLGenerator(); Set<Class<?>> classes = new HashSet<Class<?>>(); classes.add(Resource1.class); classes.add(Resource2.class); classes.add(MyInterface.class); Application app = generator.generate("", classes); Assert.assertNotNull(app); marshalIt(app); }
public Application generate(String baseURI, Set<Class<?>> classes) { Application app = new Application(); if (classes == null || classes.isEmpty()) { return app; } Resources resources = new Resources(); resources.setBase(baseURI); Set<ClassMetadata> metadataSet = buildClassMetdata(classes); resources.getResource().addAll(buildResources(metadataSet)); app.getResources().add(resources); return app; }
WADLGenerator { public Application generate(String baseURI, Set<Class<?>> classes) { Application app = new Application(); if (classes == null || classes.isEmpty()) { return app; } Resources resources = new Resources(); resources.setBase(baseURI); Set<ClassMetadata> metadataSet = buildClassMetdata(classes); resources.getResource().addAll(buildResources(metadataSet)); app.getResources().add(resources); return app; } }
WADLGenerator { public Application generate(String baseURI, Set<Class<?>> classes) { Application app = new Application(); if (classes == null || classes.isEmpty()) { return app; } Resources resources = new Resources(); resources.setBase(baseURI); Set<ClassMetadata> metadataSet = buildClassMetdata(classes); resources.getResource().addAll(buildResources(metadataSet)); app.getResources().add(resources); return app; }  }
WADLGenerator { public Application generate(String baseURI, Set<Class<?>> classes) { Application app = new Application(); if (classes == null || classes.isEmpty()) { return app; } Resources resources = new Resources(); resources.setBase(baseURI); Set<ClassMetadata> metadataSet = buildClassMetdata(classes); resources.getResource().addAll(buildResources(metadataSet)); app.getResources().add(resources); return app; }  Application generate(String baseURI, Set<Class<?>> classes); }
WADLGenerator { public Application generate(String baseURI, Set<Class<?>> classes) { Application app = new Application(); if (classes == null || classes.isEmpty()) { return app; } Resources resources = new Resources(); resources.setBase(baseURI); Set<ClassMetadata> metadataSet = buildClassMetdata(classes); resources.getResource().addAll(buildResources(metadataSet)); app.getResources().add(resources); return app; }  Application generate(String baseURI, Set<Class<?>> classes);  }