private static List<CacheParameterDetail> initializeKeyParameterDetails(List<CacheParameterDetail> allParameters) { List<CacheParameterDetail> all = new ArrayList<>(); List<CacheParameterDetail> annotated = new ArrayList<>(); for (CacheParameterDetail allParameter : allParameters) { if (!allParameter.isValue()) { all.add(allParameter); } if (allParameter.isKey()) { annotated.add(allParameter); } } return (annotated.isEmpty() ? all : annotated); }
@Nullable private static CacheParameterDetail initializeValueParameterDetail( Method method, List<CacheParameterDetail> allParameters) { CacheParameterDetail result = null; for (CacheParameterDetail parameter : allParameters) { if (parameter.isValue()) { if (result == null) { result = parameter; } else { throw new IllegalArgumentException("More than one @CacheValue found on " + method + ""); } } } return result; }
private static List<CacheParameterDetail> initializeKeyParameterDetails(List<CacheParameterDetail> allParameters) { List<CacheParameterDetail> all = new ArrayList<>(); List<CacheParameterDetail> annotated = new ArrayList<>(); for (CacheParameterDetail allParameter : allParameters) { if (!allParameter.isValue()) { all.add(allParameter); } if (allParameter.isKey()) { annotated.add(allParameter); } } return (annotated.isEmpty() ? all : annotated); }
private static CacheParameterDetail initializeValueParameterDetail( Method method, List<CacheParameterDetail> allParameters) { CacheParameterDetail result = null; for (CacheParameterDetail parameter : allParameters) { if (parameter.isValue()) { if (result == null) { result = parameter; } else { throw new IllegalArgumentException("More than one @CacheValue found on " + method + ""); } } } return result; }
private static List<CacheParameterDetail> initializeKeyParameterDetails(List<CacheParameterDetail> allParameters) { List<CacheParameterDetail> all = new ArrayList<CacheParameterDetail>(); List<CacheParameterDetail> annotated = new ArrayList<CacheParameterDetail>(); for (CacheParameterDetail allParameter : allParameters) { if (!allParameter.isValue()) { all.add(allParameter); } if (allParameter.isKey()) { annotated.add(allParameter); } } return (annotated.isEmpty() ? all : annotated); }
@Nullable private static CacheParameterDetail initializeValueParameterDetail( Method method, List<CacheParameterDetail> allParameters) { CacheParameterDetail result = null; for (CacheParameterDetail parameter : allParameters) { if (parameter.isValue()) { if (result == null) { result = parameter; } else { throw new IllegalArgumentException("More than one @CacheValue found on " + method + ""); } } } return result; }