package com.github.bingoohuang.asmvalidator;

import lombok.AllArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

@ToString @AllArgsConstructor
public class ValidateError {
    private String fieldName;
    private final Object fieldValue;
    private final String errorMessage;

    public ValidateError replaceFieldName(String oldName, String newName) {
        if (StringUtils.equals(oldName, fieldName)) fieldName = newName;
        return this;
    }
}

@@ -73,16 +73,38 @@
 ructor;%0A
+import lombok.Getter;%0A
 import l
@@ -228,23 +228,23 @@
 r %7B%0A    
-priva
+@Get
 te
+r
  String 
@@ -254,31 +254,31 @@
 ldName;%0A    
-priva
+@Get
 te
+r
  final Objec
@@ -299,15 +299,15 @@
     
-priva
+@Get
 te
+r
  fin

add getter for ValidateError