All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.emc.ia.sip.assembly.stringtemplate.MapModelAdaptor Maven / Gradle / Ivy

/*
 * Copyright (c) 2016 EMC Corporation. All Rights Reserved.
 */
package com.emc.ia.sip.assembly.stringtemplate;

import java.util.Map;

import org.stringtemplate.v4.Interpreter;
import org.stringtemplate.v4.ModelAdaptor;
import org.stringtemplate.v4.ST;
import org.stringtemplate.v4.misc.STNoSuchPropertyException;


class MapModelAdaptor implements ModelAdaptor {

  @Override
  @SuppressWarnings("rawtypes")
  public Object getProperty(Interpreter interpreter, ST template, Object model, Object property, String propertyName)
      throws STNoSuchPropertyException {

    return ((Map)model).get(propertyName);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy