Example usage for java.io PrintStream getClass

List of usage examples for java.io PrintStream getClass

Introduction

In this page you can find the example usage for java.io PrintStream getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:fi.jumi.core.stdout.SynchronizedPrintStreamTest.java

@Test
public void the_class_name_in_stack_traces_gives_a_hint_of_who_generated_the_proxy_class() {
    PrintStream printStream = SynchronizedPrintStream.create(new NullOutputStream(), Charset.defaultCharset(),
            lock);//from  www  .j av a 2 s.  com

    assertThat(printStream.getClass().getName(), startsWith(SynchronizedPrintStream.class.getName()));
}