MethodDeclaration writeMethodDeclaration) {
if (readMethodDeclaration == null) {
String expectedReadMethodName =
FieldDeclarationUtil.getReadMethodName(fieldDeclaration);
if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
throw new ValidationException(
MessageCode.SLIM3GEN1011,
env,
fieldDeclaration.getPosition(),
expectedReadMethodName);
}
throw new ValidationException(
MessageCode.SLIM3GEN1024,
env,
classDeclaration.getPosition(),
expectedReadMethodName,
fieldDeclaration.getSimpleName(),
fieldDeclaration.getDeclaringType().getQualifiedName());
}
if (writeMethodDeclaration == null) {
String expectedWriteMethodName =
FieldDeclarationUtil.getWriteMethodName(fieldDeclaration);
if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
throw new ValidationException(
MessageCode.SLIM3GEN1012,
env,
fieldDeclaration.getPosition(),
expectedWriteMethodName);
}
throw new ValidationException(
MessageCode.SLIM3GEN1025,
env,
classDeclaration.getPosition(),
expectedWriteMethodName,
fieldDeclaration.getSimpleName(),