Exemplo n.º 1
0
 @Override
 protected Map getBasicInstance(Class<?> type) {
   Helper.assertIsAssignableTo(type, getTypes());
   return MapHelper.buildMap(
       new EnumMap<SomeEnum, SerializableComparableObject>(SomeEnum.class),
       SomeEnum.class,
       SerializableComparableObject.class);
 }
Exemplo n.º 2
0
  @SuppressWarnings("unchecked")
  public Map doGenerate(Parameterizable parameterizedType) {
    Helper.assertIsAssignableTo(parameterizedType.getType(), getTypes());

    Class<?> type = (Class<?>) parameterizedType.getParameterTypes().get(0);
    EnumMap returnedMap = new EnumMap(type);
    return MapHelper.buildMap(
        returnedMap,
        parameterizedType.getParameterTypes().get(0),
        parameterizedType.getParameterTypes().get(1));
  }
Exemplo n.º 3
0
 @Override
 protected Collection getBasicInstance(Class<?> type) {
   Helper.assertIsAssignableTo(type, getTypes());
   return new Stack();
 }