Example usage for java.util ServiceLoader toString

List of usage examples for java.util ServiceLoader toString

Introduction

In this page you can find the example usage for java.util ServiceLoader toString.

Prototype

public String toString() 

Source Link

Document

Returns a string describing this service.

Usage

From source file:Main.java

public static void main(String[] args) {
    ServiceLoader<JavaCompiler> compilers = ServiceLoader.load(JavaCompiler.class);
    System.out.println(compilers.toString());

    for (JavaCompiler compiler : compilers)
        System.out.println(compiler);
}

From source file:EnumAlternateJavaCompilers.java

public static void main(String[] args) {
    ServiceLoader<JavaCompiler> compilers;
    compilers = ServiceLoader.load(JavaCompiler.class);
    System.out.println(compilers.toString());

    for (JavaCompiler compiler : compilers)
        System.out.println(compiler);
}