public Config buildConfig(Class class1) { Microserver microserver = (Microserver) class1.getAnnotation(Microserver.class); if (microserver == null){ microserver = Microserver.Instance.class.getAnnotation(Microserver.class); } String[] basePackages=microserver.basePackages(); if(basePackages.length==0){ String[] basePackagesFromClass ={class1.getPackage().getName()}; basePackages = basePackagesFromClass; } List<Class> classes = buildClasses(class1, microserver); Map<String, String> properties = buildProperties(microserver); return Config.instance().withBasePackages(basePackages).withEntityScan(microserver.entityScan()).withClasses(cyclops.data.HashSet.fromIterable(classes)) .withPropertiesName(microserver.propertiesName()).withInstancePropertiesName(microserver.instancePropertiesName()) .withServiceTypePropertiesName(microserver.serviceTypePropertiesName()) .withAllowCircularReferences(microserver.allowCircularDependencies()).withProperties(HashMap.fromMap(properties)).set(); }
default HashSet<T> toHashSet(){ return HashSet.fromIterable(this); } /**
default HashSet<T> hashSet(){ return HashSet.fromIterable(this); } default Vector<T> vector(){
public HashSet<T> hashSet(){ return HashSet.fromIterable(iterable); } public Bag<T> bag(){
@Override public <R> HashSet<R> unitIterable(Iterable<R> it) { return fromIterable(it); }
public static <T> HashSet<T> fromIterator(Iterator<T> it){ return fromIterable((()->it)); }
@Override public <R> HashSet<R> unitIterable(Iterable<R> it) { return fromIterable(it); }
default HashSet<T> toHashSet(){ return HashSet.fromIterable(this); } /**
default HashSet<T> hashSet(){ return HashSet.fromIterable(this); } default Vector<T> vector(){
public HashSet<T> hashSet(){ return HashSet.fromIterable(iterable); } public Bag<T> bag(){
public static <T> HashSet<T> fromIterator(Iterator<T> it){ return fromIterable((()->it)); }
public Config buildConfig(Class class1) { Microserver microserver = (Microserver) class1.getAnnotation(Microserver.class); if (microserver == null){ microserver = Microserver.Instance.class.getAnnotation(Microserver.class); } String[] basePackages=microserver.basePackages(); if(basePackages.length==0){ String[] basePackagesFromClass ={class1.getPackage().getName()}; basePackages = basePackagesFromClass; } List<Class> classes = buildClasses(class1, microserver); Map<String, String> properties = buildProperties(microserver); return Config.instance().withBasePackages(basePackages).withEntityScan(microserver.entityScan()).withClasses(cyclops.data.HashSet.fromIterable(classes)) .withPropertiesName(microserver.propertiesName()).withInstancePropertiesName(microserver.instancePropertiesName()) .withServiceTypePropertiesName(microserver.serviceTypePropertiesName()) .withAllowCircularReferences(microserver.allowCircularDependencies()).withProperties(HashMap.fromMap(properties)).set(); }