private static void addRequiredAnnotation(DomExtension e, final ParameterData data) {
    if (Boolean.parseBoolean(data.parameter.getRequired().getStringValue())
        && StringUtil.isEmptyOrSpaces(data.defaultValue)
        && StringUtil.isEmptyOrSpaces(data.expression)) {
      e.addCustomAnnotation(new Required(){
        @Override
        public boolean value() {
          return true;
        }

        @Override
        public boolean nonEmpty() {
          return false;
        }

        @Override
        public boolean identifier() {
          return false;
        }
        @Override
        public Class<? extends Annotation> annotationType() {
              return Required.class;
        }
      });
    }
  }
private static void addRequiredAnnotation(DomExtension e, final ParameterData data)