@SuppressWarnings("unchecked") @Override protected void configure() { super.configure(); bind(new TypeLiteral<ComputeServiceAdapter<ServerInfo, Hardware, LibraryDrive, Location>>() { }).to(CloudSigma2ComputeServiceAdapter.class); bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() { }).to(ServerInfoToNodeMetadata.class); bind(new TypeLiteral<Function<LibraryDrive, Image>>() { }).to(LibraryDriveToImage.class); bind(new TypeLiteral<Function<ServerDrive, Volume>>() { }).to(ServerDriveToVolume.class); bind(new TypeLiteral<Function<Hardware, Hardware>>() { }).to(Class.class.cast(IdentityFunction.class)); bind(new TypeLiteral<Function<Location, Location>>() { }).to(Class.class.cast(IdentityFunction.class)); bind(new TypeLiteral<Function<NIC, String>>() { }).to(NICToAddress.class); bind(TemplateOptions.class).to(CloudSigma2TemplateOptions.class); bind(NodeAndTemplateOptionsToStatement.class).to(NodeAndTemplateOptionsToStatementWithoutPublicKey.class); }
@SuppressWarnings("unchecked") @Override protected void configure() { super.configure(); bind(new TypeLiteral<ComputeServiceAdapter<ServerInfo, Hardware, LibraryDrive, Location>>() { }).to(CloudSigma2ComputeServiceAdapter.class); bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() { }).to(ServerInfoToNodeMetadata.class); bind(new TypeLiteral<Function<LibraryDrive, Image>>() { }).to(LibraryDriveToImage.class); bind(new TypeLiteral<Function<ServerDrive, Volume>>() { }).to(ServerDriveToVolume.class); bind(new TypeLiteral<Function<Hardware, Hardware>>() { }).to(Class.class.cast(IdentityFunction.class)); bind(new TypeLiteral<Function<Location, Location>>() { }).to(Class.class.cast(IdentityFunction.class)); bind(new TypeLiteral<Function<NIC, String>>() { }).to(NICToAddress.class); bind(TemplateOptions.class).to(CloudSigma2TemplateOptions.class); bind(NodeAndTemplateOptionsToStatement.class).to(NodeAndTemplateOptionsToStatementWithoutPublicKey.class); }