org.apache.inlong.sort.filesystem.shaded.com.amazonaws.protocol.MarshallingType Maven / Gradle / Ivy
/*
* Copyright 2011-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.protocol;
import com.amazonaws.annotation.SdkProtectedApi;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Represents the various types supported for marshalling.
*
* @param Java type bound to the marshalling type.
*/
@SdkProtectedApi
public interface MarshallingType {
/**
* Determine whether this marshalling type is the default marshaller for the provided class. This is used to automatically
* determine the marshaller to be used in the contents of lists or maps.
*/
boolean isDefaultMarshallerForType(Class type);
/**
* Used when a value is null (and thus type can't be determined).
*/
MarshallingType NULL = new DefaultMarshallingType(Void.class);
MarshallingType STRING = new DefaultMarshallingType(String.class);
MarshallingType INTEGER = new DefaultMarshallingType(Integer.class);
MarshallingType LONG = new DefaultMarshallingType(Long.class);
MarshallingType SHORT = new DefaultMarshallingType(Short.class);
MarshallingType FLOAT = new DefaultMarshallingType(Float.class);
MarshallingType DOUBLE = new DefaultMarshallingType(Double.class);
MarshallingType BIG_DECIMAL = new DefaultMarshallingType(BigDecimal.class);
MarshallingType BOOLEAN = new DefaultMarshallingType(Boolean.class);
MarshallingType DATE = new DefaultMarshallingType(Date.class);
MarshallingType BYTE_BUFFER = new DefaultMarshallingType(ByteBuffer.class);
MarshallingType STREAM = new DefaultMarshallingType(InputStream.class);
MarshallingType STRUCTURED = new DefaultMarshallingType(StructuredPojo.class);
MarshallingType LIST = new DefaultMarshallingType(List.class);
MarshallingType