| 1 33 package net.sf.jga.parser; 34 35 import net.sf.jga.fn.BinaryFunctor; 36 37 43 44 public class BinaryFunctorRef<T1,T2,R> implements FunctorRef<BinaryFunctor<T1,T2,R>> { 45 private BinaryFunctor<T1,T2,R> _bf; 46 private Class [] _argType = new Class [2]; 47 private String [] _argName = new String [2]; private Class _returnType; 49 50 public BinaryFunctorRef (BinaryFunctor<T1,T2,R> bf, Class arg1Type, Class arg2Type, 51 Class returnType) 52 { 53 _bf = bf; 54 _argType[0] = arg1Type; 55 _argType[1] = arg2Type; 56 _returnType = returnType; 57 } 58 59 60 public BinaryFunctor<T1,T2,R> getFunctor() { return _bf; } 62 public Class getReturnType() { return _returnType; } 63 public int getNumberArgs() { return _argType.length; } 64 public Class getArgType(int i) { return _argType[i]; } 65 public String getArgName(int i) { return "foo"; } 66 public int getReferenceType() { return BINARY_FN; } 67 68 public String toString() { return _bf.toString()+":"+getReturnType().getName(); } 70 } 71 | Popular Tags |