protected void throwJsonPropertyUnknownClassificationCodeException( String code, JsonReader in, ClassificationUnknownCodeException e) { final String propertyPath = in.getPath(); final ExceptionMessageBuilder br = new ExceptionMessageBuilder(); br.addNotice("Unknown classification code for the JSON property."); br.addItem("Advice"); br.addElement("Make sure your classification code in requested JSON."); br.addElement("And confirm the classification elements."); br.addItem("Classification"); br.addElement(clsType); br.addItem("Unknown Code"); br.addElement(code); br.addItem("JSON Property"); br.addElement(propertyPath); final String msg = br.buildExceptionMessage(); throw new JsonPropertyClassificationCodeUnknownException(msg, clsType, propertyPath, e); }
protected void throwJsonPropertyClassificationCodeOfMethodNotFoundException( String code, JsonReader in, ClassificationCodeOfMethodNotFoundException e) { final ExceptionMessageBuilder br = new ExceptionMessageBuilder(); br.addNotice("Not found the codeOf() in the classification type for the JSON property."); br.addItem("Advice"); br.addElement("The classification type of JSON property should have the codeOf() method."); br.addElement("And you should use CDef type that always has the method."); br.addElement("For example:"); br.addElement(" (x)"); br.addElement(" public String memberName;"); br.addElement(" public Classification memberStatus; // *NG"); br.addElement(" (o)"); br.addElement(" public String memberName;"); br.addElement(" public CDef.MemberStatus memberStatus; // OK"); br.addItem("Classification"); br.addElement(clsType); br.addItem("Specified Code"); br.addElement(code); br.addItem("JSON Property"); br.addElement(in.getPath()); final String msg = br.buildExceptionMessage(); throw new JsonPropertyClassificationCodeOfMethodNotFoundException(msg, e); }