@Override public Iterable<TypeDeclaration> findTypes(Api api) { return api.types(); } };
private Map<String, RamlDataType> getAllTypes(Api api) { Map<String, RamlDataType> types = api.types().stream() .collect(Collectors.toMap(this::nameType, this::typeDeclarationToRamlDataType)); api.uses().forEach(lib -> this.getTypesFromLib(types, lib)); return types; }
@Override public TypeDeclaration fetchType(Api api, final String name) throws GenerationException { return FluentIterable.from(Optional.fromNullable(foundInApi).or(api.types())) .firstMatch(namedPredicate(name)).or(fail(name)); }
@Override public TypeDeclaration fetchType(Api api, final String name) throws GenerationException { return FluentIterable.from(Optional.fromNullable(foundInApi).or(FluentIterable.from(api.types()).append(Utils.goThroughLibraries(new ArrayList<TypeDeclaration>(), new HashSet<String>(), api.uses())))) .firstMatch(namedPredicate(name)).or(fail(name)); }
@Override public Iterable<TypeDeclaration> findTypes(Api api) { return FluentIterable.from(api.types()) .append(resourceTypes(api.resources())) .append(Utils.goThroughLibraries(new ArrayList<TypeDeclaration>(), new HashSet<String>(), api.uses())); } };
@Override public GFinder findTypes(GFinderListener listener) { if (api.uses() != null) { goThroughLibraries(new HashSet<String>(), api.uses(), listener); } localTypes(api.types(), listener); resourceTypes(api.resources(), listener); return this; }
@Override public GFinder findTypes(GFinderListener listener) { if (api.uses() != null) { goThroughLibraries(new HashSet<String>(), api.uses(), listener); } localTypes(api.types(), listener); resourceTypes(api.resources(), listener); return this; }