This message was deleted.
# general
s
This message was deleted.
r
Hey Fabrice!
AzureCloudBlobIterableFactory
is currently created via guice (through
FactoryModuleBuilder
https://google.github.io/guice/api-docs/3.0/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html)
From what I understand, guice just creates an implicit factory through the provided interface (in this case
AzureCloudBlobIterableFactory
). If you see, the
create
method contains all the parameters needed to construct
AzureCloudBlobIterable
- so the automatically created factory just uses the parameters to create an
AzureCloudBlobIterable
object. If you don't want to use guice, you can create a factory manually which just creates new
AzureCloudBlobIterable
objects given the
create
parameters
Does the help?
f
Thanks @Rohan Garg can you give me an example of implementation of your last suggestion? I am completely lost
r
sure! I was thinking something like :
Copy code
class MyAzureCloudBlobIterableFactory {
  AzureCloudBlobIteratorFactory azureCloudBlobIteratorFactory; // have this as a member variable in the factory

  AzureCloudBlobIterable create(Iterable<URI> prefixes, int maxListingLength, AzureStorage azureStorage) {
    return new AzureCloudBlobIterable(azureCloudBlobIteratorFactory, prefixes, maxListingLength, azureStorage);
  }
}
guice is also doing something like this implicitly. does that make sense?
f
Thanks it works!
👍 1