Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2014-2015 Amazon Technologies, Inc.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
 * 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.
A strategy for mapping between Java types and DynamoDB types. Serves as a factory for ItemConverter instances that implement this mapping. Standard implementations are available in the ConversionSchemas class.
public interface ConversionSchema {

Dependency injection for the ItemConverters that this ConversionSchema generates.
    static class Dependencies {
        private final Map<Class<?>, Objectvalues;
        public Dependencies() {
             = new HashMap<Class<?>, Object>();
        public <T> T get(Class<T> clazz) {
            return (T) .get(clazz);
        public <T> Dependencies with(Class<T> clazz, T value) {
            return this;
        public String toString() {
            return .toString();

Creates an ItemConverter, injecting dependencies from the DynamoDBMapper that needs it.

dependencies the dependencies to inject
a new ItemConverter
    ItemConverter getConverter(Dependencies dependencies);
New to GrepCode? Check out our FAQ X