webit.script.resolvers.impl.MapResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webit-script Show documentation
Show all versions of webit-script Show documentation
a template-like script and engine, all writen with Java.
The newest version!
// Copyright (c) 2013-2014, Webit Team. All Rights Reserved.
package webit.script.resolvers.impl;
import java.util.Map;
import webit.script.resolvers.GetResolver;
import webit.script.resolvers.SetResolver;
/**
*
* @author Zqq
*/
public class MapResolver implements GetResolver, SetResolver {
public Class getMatchClass() {
return Map.class;
}
public Object get(Object object, Object property) {
return ((Map) object).get(property);
}
@SuppressWarnings("unchecked")
public void set(Object object, Object property, Object value) {
((Map) object).put(property, value);
}
}