KEYCLOAK-1325
Public/private SPI
This commit is contained in:
1 parent
826c60ae36
commit
f50570e350
38 files changed
+111
-85
No files matched your search
@@ -1,34 +0,0 @@
|
||||
package org.keycloak.testsuite.utils;
|
||||
|
||||
import org.keycloak.provider.Spi;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
|
||||
*/
|
||||
public class ListSpi {
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<String> l = new LinkedList<>();
|
||||
for (Spi s : ServiceLoader.load(Spi.class)) {
|
||||
l.add(fixedLength(s.getName()) + s.isPrivate());
|
||||
}
|
||||
Collections.sort(l);
|
||||
System.out.println(fixedLength("SPI") + "Private");
|
||||
System.out.println("-------------------------------------");
|
||||
for (String s : l) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
|
||||
public static String fixedLength(String s) {
|
||||
while (s.length() < 30) {
|
||||
s = s + " ";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user