package cuchaz.enigma.mapping; import java.util.List; import com.beust.jcommander.internal.Lists; public class BehaviorSignature { public static interface ClassReplacer { ClassEntry replace(ClassEntry entry); } private List m_argumentTypes; private Type m_returnType; public BehaviorSignature(String signature) { m_argumentTypes = Lists.newArrayList(); int i=0; while (i getArgumentTypes() { return m_argumentTypes; } public Type getReturnType() { return m_returnType; } @Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("("); for (int i=0; i 0) { buf.append(","); } buf.append(m_argumentTypes.get(i).toString()); } buf.append(")"); buf.append(m_returnType.toString()); return buf.toString(); } public Iterable types() { List types = Lists.newArrayList(); types.addAll(m_argumentTypes); types.add(m_returnType); return types; } public Iterable classes() { List out = Lists.newArrayList(); for (Type type : types()) { if (type.isClass()) { out.add(type.getClassEntry()); } } return out; } }