Example usage for org.springframework.core.codec Encoder getClass

List of usage examples for org.springframework.core.codec Encoder getClass

Introduction

In this page you can find the example usage for org.springframework.core.codec Encoder getClass.

Prototype

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

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.springframework.http.codec.EncoderHttpMessageWriter.java

private void initLogger(Encoder<T> encoder) {
    if (encoder instanceof AbstractEncoder
            && encoder.getClass().getPackage().getName().startsWith("org.springframework.core.codec")) {

        Log logger = HttpLogging.forLog(((AbstractEncoder) encoder).getLogger());
        ((AbstractEncoder) encoder).setLogger(logger);
    }/*w w w .  j a v  a  2 s .c o m*/
}