| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.el.impl; |
| 17 | |
|
| 18 | |
import javax.faces.application.Application; |
| 19 | |
import javax.faces.el.MethodBinding; |
| 20 | |
import javax.faces.el.ValueBinding; |
| 21 | |
|
| 22 | |
import org.seasar.teeda.core.el.ELParser; |
| 23 | |
import org.seasar.teeda.core.el.MethodBindingFactory; |
| 24 | |
import org.seasar.teeda.core.el.ValueBindingBase; |
| 25 | |
import org.seasar.teeda.core.el.ValueBindingFactory; |
| 26 | |
import org.seasar.teeda.core.exception.IllegalClassTypeException; |
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | 1 | public class MethodBindingFactoryImpl implements MethodBindingFactory { |
| 32 | |
|
| 33 | |
private ValueBindingFactory valueBindingContextFactory; |
| 34 | |
|
| 35 | |
public void setValueBindingContext( |
| 36 | |
ValueBindingFactory valueBindingContextFactory) { |
| 37 | 2 | this.valueBindingContextFactory = valueBindingContextFactory; |
| 38 | 2 | } |
| 39 | |
|
| 40 | |
public MethodBinding createMethodBinding(Application application, |
| 41 | |
String ref, Class[] params) { |
| 42 | 0 | ValueBinding vb = valueBindingContextFactory.createValueBinding( |
| 43 | |
application, ref); |
| 44 | 0 | ELParser parser = valueBindingContextFactory.getELParser(); |
| 45 | 0 | if (!(vb instanceof ValueBindingBase)) { |
| 46 | 0 | throw new IllegalClassTypeException(ValueBindingBase.class, |
| 47 | |
ValueBinding.class); |
| 48 | |
} |
| 49 | 0 | MethodBinding mb = new MethodBindingImpl((ValueBindingBase) vb, params, |
| 50 | |
parser); |
| 51 | 0 | return mb; |
| 52 | |
} |
| 53 | |
|
| 54 | |
} |