@Test public void testMultiValue3() throws Exception { MultiValuedResourceAE.resources.clear(); ExternalResourceDescription extDesc1 = createResourceDescription(ResourceWithAssert.class); ExternalResourceDescription extDesc2 = createResourceDescription(ResourceWithAssert.class); AnalysisEngineDescription aed = createEngineDescription( createEngineDescription(MultiValuedResourceAE.class, MultiValuedResourceAE.RES_RESOURCE_ARRAY, asList(extDesc1, extDesc2)), createEngineDescription(createEngineDescription(MultiValuedResourceAE.class, MultiValuedResourceAE.RES_RESOURCE_ARRAY, asList(extDesc1, extDesc2)))); AnalysisEngine ae = createEngine(aed); ae.process(ae.newJCas()); assertEquals(MultiValuedResourceAE.resources.get(0), MultiValuedResourceAE.resources.get(2)); assertEquals(MultiValuedResourceAE.resources.get(1), MultiValuedResourceAE.resources.get(3)); }
public static ExternalResourceDescription createResourceDescription( Class<? extends Resource> aInterface, Object... aParams) { return createNamedResourceDescription(uniqueResourceKey(aInterface.getName()), aInterface, aParams); }
ExternalResourceFactory { public static ExternalResourceDescription createResourceDescription( Class<? extends Resource> aInterface, Object... aParams) { return createNamedResourceDescription(uniqueResourceKey(aInterface.getName()), aInterface, aParams); } }
ExternalResourceFactory { public static ExternalResourceDescription createResourceDescription( Class<? extends Resource> aInterface, Object... aParams) { return createNamedResourceDescription(uniqueResourceKey(aInterface.getName()), aInterface, aParams); } private  ExternalResourceFactory(); }
ExternalResourceFactory { public static ExternalResourceDescription createResourceDescription( Class<? extends Resource> aInterface, Object... aParams) { return createNamedResourceDescription(uniqueResourceKey(aInterface.getName()), aInterface, aParams); } private  ExternalResourceFactory(); static boolean isExternalResourceField(Field field); static ExternalResourceDescription createResourceDescription(
          Class<? extends Resource> aInterface, Object... aParams); static ExternalResourceDescription createNamedResourceDescription(final String aName,
          Class<? extends Resource> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          String aUrl, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          URL aUrl, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          File aFile, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createNamedResourceDescriptionUsingUrl(final String aName,
          Class<? extends SharedResourceObject> aInterface, String aUrl, Object... aParams); static ExternalResourceDescription createNamedFileResourceDescription(
          final String aName, String aUrl); static ExternalResourceBinding createResourceBinding(final String aKey,
          final ExternalResourceDescription aResource); static ExternalResourceBinding createResourceBinding(final String aKey,
          final String aResourceKey); @SuppressWarnings({ "unchecked", "rawtypes" }) static ExternalResourceDependency createResourceDependency(Field field); static ExternalResourceDependency createResourceDependency(final String aKey,
          final Class<?> aInterface, final boolean aOptional, String aDescription); static ExternalResourceDependency[] createResourceDependencies(
          Class<?> cls); static void bindResource(ResourceSpecifier aDesc, String aKey, URL aUrl); static void bindResource(ResourceSpecifier aDesc, String aKey, File aFile); @Deprecated static void bindResource(ResourceSpecifier aDesc, String aKey, String aUrl); static void bindResourceUsingUrl(ResourceSpecifier aDesc, String aKey, String aUrl); static void bindResource(ResourceSpecifier aDesc, Class<? extends Resource> aRes,
          String... aParams); static void bindResource(ResourceSpecifier aDesc, Class<?> aApi,
          Class<? extends Resource> aRes, String... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc, Class<?> aApi,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc, String aKey,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResource(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aRes, String... aParams); static void bindResource(ResourceSpecifier aDesc, ExternalResourceDescription aResDesc); static void bindResource(ResourceSpecifier aDesc, String aKey,
          ExternalResourceDescription aResDesc); static void createDependencyAndBind(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aImpl, String... aParams); static void createDependencyAndBind(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aImpl, Class<?> aApi, String... aParams); static void createDependency(ResourceSpecifier aDesc, String aKey, Class<?> aApi); static void createDependencyAndBindUsingUrl(AnalysisEngineDescription aDesc, String aKey,
          Class<? extends SharedResourceObject> aImpl, String aUrl, Object... aParams); @Deprecated static void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          ExternalResourceDescription aRes); static void bindResourceOnce(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          ExternalResourceDescription aRes); @Deprecated static void bindResource(ExternalResourceDescription aRes, String aBindTo,
          ExternalResourceDescription aNestedRes); static void bindResourceOnce(ExternalResourceDescription aRes, String aBindTo,
          ExternalResourceDescription aNestedRes); static void bindResourceOnce(ResourceCreationSpecifier aDesc, String aBindTo,
          ExternalResourceDescription aRes); @Deprecated static void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          String aRes); static void bindResourceOnceWithoutNested(ResourceManagerConfiguration aResMgrCfg,
          String aBindTo, String aRes); static void bindResourceOnceWithoutNested(ResourceCreationSpecifier aDesc, String aBindTo, String aRes); static R createResource(Class<R> resourceClass,
          Object... params); @SuppressWarnings("unchecked") static R createResource(Class<R> resourceClass,
          ResourceManager resMgr, Object... params); }
ExternalResourceFactory { public static ExternalResourceDescription createResourceDescription( Class<? extends Resource> aInterface, Object... aParams) { return createNamedResourceDescription(uniqueResourceKey(aInterface.getName()), aInterface, aParams); } private  ExternalResourceFactory(); static boolean isExternalResourceField(Field field); static ExternalResourceDescription createResourceDescription(
          Class<? extends Resource> aInterface, Object... aParams); static ExternalResourceDescription createNamedResourceDescription(final String aName,
          Class<? extends Resource> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          String aUrl, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          URL aUrl, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createSharedResourceDescription(
          File aFile, Class<? extends SharedResourceObject> aInterface, Object... aParams); static ExternalResourceDescription createNamedResourceDescriptionUsingUrl(final String aName,
          Class<? extends SharedResourceObject> aInterface, String aUrl, Object... aParams); static ExternalResourceDescription createNamedFileResourceDescription(
          final String aName, String aUrl); static ExternalResourceBinding createResourceBinding(final String aKey,
          final ExternalResourceDescription aResource); static ExternalResourceBinding createResourceBinding(final String aKey,
          final String aResourceKey); @SuppressWarnings({ "unchecked", "rawtypes" }) static ExternalResourceDependency createResourceDependency(Field field); static ExternalResourceDependency createResourceDependency(final String aKey,
          final Class<?> aInterface, final boolean aOptional, String aDescription); static ExternalResourceDependency[] createResourceDependencies(
          Class<?> cls); static void bindResource(ResourceSpecifier aDesc, String aKey, URL aUrl); static void bindResource(ResourceSpecifier aDesc, String aKey, File aFile); @Deprecated static void bindResource(ResourceSpecifier aDesc, String aKey, String aUrl); static void bindResourceUsingUrl(ResourceSpecifier aDesc, String aKey, String aUrl); static void bindResource(ResourceSpecifier aDesc, Class<? extends Resource> aRes,
          String... aParams); static void bindResource(ResourceSpecifier aDesc, Class<?> aApi,
          Class<? extends Resource> aRes, String... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc, Class<?> aApi,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResourceUsingUrl(ResourceSpecifier aDesc, String aKey,
          Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams); static void bindResource(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aRes, String... aParams); static void bindResource(ResourceSpecifier aDesc, ExternalResourceDescription aResDesc); static void bindResource(ResourceSpecifier aDesc, String aKey,
          ExternalResourceDescription aResDesc); static void createDependencyAndBind(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aImpl, String... aParams); static void createDependencyAndBind(ResourceSpecifier aDesc, String aKey,
          Class<? extends Resource> aImpl, Class<?> aApi, String... aParams); static void createDependency(ResourceSpecifier aDesc, String aKey, Class<?> aApi); static void createDependencyAndBindUsingUrl(AnalysisEngineDescription aDesc, String aKey,
          Class<? extends SharedResourceObject> aImpl, String aUrl, Object... aParams); @Deprecated static void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          ExternalResourceDescription aRes); static void bindResourceOnce(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          ExternalResourceDescription aRes); @Deprecated static void bindResource(ExternalResourceDescription aRes, String aBindTo,
          ExternalResourceDescription aNestedRes); static void bindResourceOnce(ExternalResourceDescription aRes, String aBindTo,
          ExternalResourceDescription aNestedRes); static void bindResourceOnce(ResourceCreationSpecifier aDesc, String aBindTo,
          ExternalResourceDescription aRes); @Deprecated static void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          String aRes); static void bindResourceOnceWithoutNested(ResourceManagerConfiguration aResMgrCfg,
          String aBindTo, String aRes); static void bindResourceOnceWithoutNested(ResourceCreationSpecifier aDesc, String aBindTo, String aRes); static R createResource(Class<R> resourceClass,
          Object... params); @SuppressWarnings("unchecked") static R createResource(Class<R> resourceClass,
          ResourceManager resMgr, Object... params); static final String PARAM_RESOURCE_NAME; static final String PREFIX_SEPARATOR; }