if (annotation.valueClassIsSerializable()) {
for (JMethod interfaceMethod: visitorInterface.methods()) {
for (JVar param: interfaceMethod.params()) {
AbstractJType type = param.type();
if (!visitorInterface.isSelf(type) && !types.isSerializable(type))
throw new SourceException("Value class can't be serializable: " + param.name() + " parameter in " + interfaceMethod.name() + " method is not serializable");
}
JVar param = interfaceMethod.listVarParam();
if (param != null) {
AbstractJType type = param.type();
if (!visitorInterface.isSelf(type) && !types.isSerializable(type))
throw new SourceException("Value class can't be serializable: " + param.name() + " parameter in " + interfaceMethod.name() + " method is not serializable");
}
}
}
if (annotation.valueClassIsComparable()) {
for (JMethod interfaceMethod: visitorInterface.methods()) {
for (JVar param: interfaceMethod.params()) {
AbstractJType type = param.type();
if (!visitorInterface.isSelf(type) && !types.isComparable(type))
throw new SourceException("Value class can't be comparable: " + param.name() + " parameter in " + interfaceMethod.name() + " method is not comparable");
}
JVar param = interfaceMethod.listVarParam();
if (param != null) {
AbstractJType type = param.type();
if (!visitorInterface.isSelf(type) && !types.isComparable(type))
throw new SourceException("Value class can't be comparable: " + param.name() + " parameter in " + interfaceMethod.name() + " method is not comparable");
}
}
}
int mods = annotation.valueClassIsPublic() ? JMod.PUBLIC: JMod.NONE;