@Override Optional<SInstance> getFieldLocalOpt(PathReader pathReader) { int fieldIndex = findFieldIndexOpt(pathReader); if (fieldIndex != -1) { return Optional.of(getField(fieldIndex)); } return Optional.empty(); }
@Override Optional<SInstance> getFieldLocalOpt(PathReader pathReader) { int fieldIndex = findFieldIndexOpt(pathReader); if (fieldIndex != -1) { return Optional.of(getField(fieldIndex)); } return Optional.empty(); }
/** * Procura o índice do elemento solicitado dentro da lista de campo ou * dispara exception se o campo não existir no tipo composto. */ private int findFieldIndex(PathReader pathReader) { int fieldIndex = findFieldIndexOpt(pathReader); if (fieldIndex == -1) { throw new SingularFormException(pathReader.getErrorMsg(this, "Não é um campo definido"), this); } return fieldIndex; }
/** * Procura o índice do elemento solicitado dentro da lista de campo ou * dispara exception se o campo não existir no tipo composto. */ private int findFieldIndex(PathReader pathReader) { int fieldIndex = findFieldIndexOpt(pathReader); if (fieldIndex == -1) { throw new SingularFormException(pathReader.getErrorMsg(this, "Não é um campo definido")); } return fieldIndex; }