@Test public void testGetAvailableCollectionTypes() throws Exception { assertEquals(3, oracle.getAvailableCollectionTypes().size()); assertTrue(oracle.getAvailableCollectionTypes().contains("List")); assertTrue(oracle.getAvailableCollectionTypes().contains("HashSet")); assertTrue(oracle.getAvailableCollectionTypes().contains("CustomCollectionOne")); assertFalse(oracle.getAvailableCollectionTypes().contains("SeemsAsCollection")); }
@Override public List<String> getAvailableCollectionTypes() { return Collections.unmodifiableList(filteredCollectionTypes.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .collect(Collectors.toList())); }
AsyncPackageDataModelOracleImpl implements AsyncPackageDataModelOracle { @Override public List<String> getAvailableCollectionTypes() { return Collections.unmodifiableList(filteredCollectionTypes.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .collect(Collectors.toList())); } }
AsyncPackageDataModelOracleImpl implements AsyncPackageDataModelOracle { @Override public List<String> getAvailableCollectionTypes() { return Collections.unmodifiableList(filteredCollectionTypes.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .collect(Collectors.toList())); } @Inject  AsyncPackageDataModelOracleImpl(final Caller<IncrementalDataModelService> service,
                                           final Instance<DynamicValidator> validatorInstance); }
AsyncPackageDataModelOracleImpl implements AsyncPackageDataModelOracle { @Override public List<String> getAvailableCollectionTypes() { return Collections.unmodifiableList(filteredCollectionTypes.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .collect(Collectors.toList())); } @Inject  AsyncPackageDataModelOracleImpl(final Caller<IncrementalDataModelService> service,
                                           final Instance<DynamicValidator> validatorInstance); Map<String, ModelField[]> getFilteredFactTypes(); @Override void init(final Path resourcePath); @Override Path getResourcePath(); @Override List<String> getPackageNames(); @Override String[] getFactTypes(); @Override String[] getAllFactTypes(); @Override String[] getInternalFactTypes(); @Override String[] getExternalFactTypes(); String getFQCNByFactName(final String factName); @Override String getFactNameFromType(final String type); @Override boolean isFactTypeRecognized(final String factType); @Override void isFactTypeAnEvent(final String factType,
                                  final Callback<Boolean> callback); @Override void getTypeSource(final String factType,
                              final Callback<TypeSource> callback); @Override void getSuperType(final String factType,
                             final Callback<String> callback); @Override void getSuperTypes(final String factType,
                              final Callback<List<String>> callback); @Override void getTypeAnnotations(final String factType,
                                   final Callback<Set<Annotation>> callback); @Override void getTypeFieldsAnnotations(final String factType,
                                         final Callback<Map<String, Set<Annotation>>> callback); @Override void validateField(final String factType,
                                  final String fieldName,
                                  final T value,
                                  final Callback<Set<ConstraintViolation<T>>> callback); @Override void getFieldCompletions(final String factType,
                                    final Callback<ModelField[]> callback); @Override void getFieldCompletions(final String factType,
                                    final FieldAccessorsAndMutators accessorOrMutator,
                                    final Callback<ModelField[]> callback); @Override String getFieldType(final String modelClassName,
                               final String fieldName); @Override String getFieldClassName(final String modelClassName,
                                    final String fieldName); @Override String getParametricFieldType(final String factType,
                                         final String fieldName); @Override void getOperatorCompletions(final String factType,
                                       final String fieldName,
                                       final Callback<String[]> callback); @Override void getConnectiveOperatorCompletions(final String factType,
                                                 final String fieldName,
                                                 final Callback<String[]> callback); @Override void getMethodInfos(final String factType,
                               final Callback<List<MethodInfo>> callback); @Override void getMethodInfos(final String factType,
                               final int parameterCount,
                               final Callback<List<MethodInfo>> callback); @Override void getMethodParams(final String factType,
                                final String methodNameWithParams,
                                final Callback<List<String>> callback); @Override void getMethodInfo(final String factType,
                              final String methodNameWithParams,
                              final Callback<MethodInfo> callback); @Override String[] getGlobalVariables(); @Override String getGlobalVariable(final String name); @Override boolean isGlobalVariable(final String name); @Override void getFieldCompletionsForGlobalVariable(final String varName,
                                                     final Callback<ModelField[]> callback); @Override void getMethodInfosForGlobalVariable(final String varName,
                                                final Callback<List<MethodInfo>> callback); @Override String[] getGlobalCollections(); @Override List<String> getAvailableCollectionTypes(); @Override List<DSLSentence> getDSLConditions(); @Override List<DSLSentence> getDSLActions(); @Override DropDownData getEnums(final String type,
                                 final String field); @Override DropDownData getEnums(final String type,
                                 final String field,
                                 final Map<String, String> currentValueMap); @Override String[] getEnumValues(String factType,
                                  String factField); @Override boolean hasEnums(final String factType,
                            final String field); @Override boolean hasEnums(final String qualifiedFactField); @Override boolean isDependentEnum(final String factType,
                                   final String parentField,
                                   final String childField); @Override void filter(final Imports imports); @Override void filter(); @Override void setModuleName(final String moduleName); @Override void setPackageName(final String packageName); @Override void addModelFields(final Map<String, ModelField[]> modelFields); @Override void addFieldParametersType(final Map<String, String> fieldParametersType); @Override void addEventTypes(final Map<String, Boolean> eventTypes); @Override void addTypeSources(final Map<String, TypeSource> typeSources); @Override void addSuperTypes(final Map<String, List<String>> superTypes); @Override void addTypeAnnotations(final Map<String, Set<Annotation>> annotations); @Override void addTypeFieldsAnnotations(final Map<String, Map<String, Set<Annotation>>> typeFieldsAnnotations); @Override void addJavaEnumDefinitions(final Map<String, String[]> dataEnumLists); @Override void addMethodInformation(final Map<String, List<MethodInfo>> methodInformation); @Override void addCollectionTypes(final Map<String, Boolean> collectionTypes); @Override void addPackageNames(final List<String> packageNames); @Override void addWorkbenchEnumDefinitions(final Map<String, String[]> dataEnumLists); @Override void addDslConditionSentences(final List<DSLSentence> dslConditionSentences); @Override void addDslActionSentences(final List<DSLSentence> dslActionSentences); @Override void addGlobals(final Map<String, String> packageGlobalTypes); }
AsyncPackageDataModelOracleImpl implements AsyncPackageDataModelOracle { @Override public List<String> getAvailableCollectionTypes() { return Collections.unmodifiableList(filteredCollectionTypes.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .collect(Collectors.toList())); } @Inject  AsyncPackageDataModelOracleImpl(final Caller<IncrementalDataModelService> service,
                                           final Instance<DynamicValidator> validatorInstance); Map<String, ModelField[]> getFilteredFactTypes(); @Override void init(final Path resourcePath); @Override Path getResourcePath(); @Override List<String> getPackageNames(); @Override String[] getFactTypes(); @Override String[] getAllFactTypes(); @Override String[] getInternalFactTypes(); @Override String[] getExternalFactTypes(); String getFQCNByFactName(final String factName); @Override String getFactNameFromType(final String type); @Override boolean isFactTypeRecognized(final String factType); @Override void isFactTypeAnEvent(final String factType,
                                  final Callback<Boolean> callback); @Override void getTypeSource(final String factType,
                              final Callback<TypeSource> callback); @Override void getSuperType(final String factType,
                             final Callback<String> callback); @Override void getSuperTypes(final String factType,
                              final Callback<List<String>> callback); @Override void getTypeAnnotations(final String factType,
                                   final Callback<Set<Annotation>> callback); @Override void getTypeFieldsAnnotations(final String factType,
                                         final Callback<Map<String, Set<Annotation>>> callback); @Override void validateField(final String factType,
                                  final String fieldName,
                                  final T value,
                                  final Callback<Set<ConstraintViolation<T>>> callback); @Override void getFieldCompletions(final String factType,
                                    final Callback<ModelField[]> callback); @Override void getFieldCompletions(final String factType,
                                    final FieldAccessorsAndMutators accessorOrMutator,
                                    final Callback<ModelField[]> callback); @Override String getFieldType(final String modelClassName,
                               final String fieldName); @Override String getFieldClassName(final String modelClassName,
                                    final String fieldName); @Override String getParametricFieldType(final String factType,
                                         final String fieldName); @Override void getOperatorCompletions(final String factType,
                                       final String fieldName,
                                       final Callback<String[]> callback); @Override void getConnectiveOperatorCompletions(final String factType,
                                                 final String fieldName,
                                                 final Callback<String[]> callback); @Override void getMethodInfos(final String factType,
                               final Callback<List<MethodInfo>> callback); @Override void getMethodInfos(final String factType,
                               final int parameterCount,
                               final Callback<List<MethodInfo>> callback); @Override void getMethodParams(final String factType,
                                final String methodNameWithParams,
                                final Callback<List<String>> callback); @Override void getMethodInfo(final String factType,
                              final String methodNameWithParams,
                              final Callback<MethodInfo> callback); @Override String[] getGlobalVariables(); @Override String getGlobalVariable(final String name); @Override boolean isGlobalVariable(final String name); @Override void getFieldCompletionsForGlobalVariable(final String varName,
                                                     final Callback<ModelField[]> callback); @Override void getMethodInfosForGlobalVariable(final String varName,
                                                final Callback<List<MethodInfo>> callback); @Override String[] getGlobalCollections(); @Override List<String> getAvailableCollectionTypes(); @Override List<DSLSentence> getDSLConditions(); @Override List<DSLSentence> getDSLActions(); @Override DropDownData getEnums(final String type,
                                 final String field); @Override DropDownData getEnums(final String type,
                                 final String field,
                                 final Map<String, String> currentValueMap); @Override String[] getEnumValues(String factType,
                                  String factField); @Override boolean hasEnums(final String factType,
                            final String field); @Override boolean hasEnums(final String qualifiedFactField); @Override boolean isDependentEnum(final String factType,
                                   final String parentField,
                                   final String childField); @Override void filter(final Imports imports); @Override void filter(); @Override void setModuleName(final String moduleName); @Override void setPackageName(final String packageName); @Override void addModelFields(final Map<String, ModelField[]> modelFields); @Override void addFieldParametersType(final Map<String, String> fieldParametersType); @Override void addEventTypes(final Map<String, Boolean> eventTypes); @Override void addTypeSources(final Map<String, TypeSource> typeSources); @Override void addSuperTypes(final Map<String, List<String>> superTypes); @Override void addTypeAnnotations(final Map<String, Set<Annotation>> annotations); @Override void addTypeFieldsAnnotations(final Map<String, Map<String, Set<Annotation>>> typeFieldsAnnotations); @Override void addJavaEnumDefinitions(final Map<String, String[]> dataEnumLists); @Override void addMethodInformation(final Map<String, List<MethodInfo>> methodInformation); @Override void addCollectionTypes(final Map<String, Boolean> collectionTypes); @Override void addPackageNames(final List<String> packageNames); @Override void addWorkbenchEnumDefinitions(final Map<String, String[]> dataEnumLists); @Override void addDslConditionSentences(final List<DSLSentence> dslConditionSentences); @Override void addDslActionSentences(final List<DSLSentence> dslActionSentences); @Override void addGlobals(final Map<String, String> packageGlobalTypes);  }