1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g3d.property;
14 import java.lang.reflect.Method;
15 import java.util.List;
17 public class MethodComboValueProvider implements ComboValueProvider {
23 public MethodComboValueProvider(Method getter, Method setter, Method values) {
30 public Object getValue(Object obj) throws Exception{
31 return getter.invoke(obj);
34 public void setValue(Object obj, Object value) throws Exception {
35 setter.invoke(obj,value);
38 public List<Object> getValues(Object obj) throws Exception {
39 return (List<Object>)values.invoke(obj);