return "toString".equals(method.getName()) && method.getParameterTypes().length == 0;
}
public Class<?> getMixinInterface() {
if (mixinInterface == null) {
InterfaceMaker im = new InterfaceMaker();
for (Map.Entry<Signature, Method> entry : methods.entrySet()) {
Signature sig = entry.getKey();
Method method = entry.getValue();
Type[] exceptionTypes = new Type[method.getExceptionTypes().length];
for (int i = 0; i < exceptionTypes.length; i++) {
exceptionTypes[i] = Type.getType(method.getExceptionTypes()[i]);
}
im.add(sig, exceptionTypes);
}
im.setClassLoader(getClassLoader());
im.setNamingPolicy(new DefaultNamingPolicy() {
@Override
public String getClassName(String prefix, String source, Object key, Predicate names) {
return super.getClassName(EMPTY_STRING, getSimpleClassName(StaticFunctionDelegatorBuilder.class),
key, names);
}
});
mixinInterface = im.create();
}
return mixinInterface;
}