本文整理汇总了Java中org.gradle.internal.reflect.Instantiator.newInstance方法的典型用法代码示例。如果您正苦于以下问题:Java Instantiator.newInstance方法的具体用法?Java Instantiator.newInstance怎么用?Java Instantiator.newInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gradle.internal.reflect.Instantiator
的用法示例。
在下文中一共展示了Instantiator.newInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Test
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public Test() {
patternSet = getFileResolver().getPatternSetFactory().create();
ListenerManager listenerManager = getListenerManager();
testListenerInternalBroadcaster = listenerManager.createAnonymousBroadcaster(TestListenerInternal.class);
testListenerBroadcaster = listenerManager.createAnonymousBroadcaster(TestListener.class);
testOutputListenerBroadcaster = listenerManager.createAnonymousBroadcaster(TestOutputListener.class);
forkOptions = new DefaultJavaForkOptions(getFileResolver());
forkOptions.setEnableAssertions(true);
Instantiator instantiator = getInstantiator();
testLogging = instantiator.newInstance(DefaultTestLoggingContainer.class, instantiator);
reports = instantiator.newInstance(DefaultTestTaskReports.class, this);
reports.getJunitXml().setEnabled(true);
reports.getHtml().setEnabled(true);
filter = instantiator.newInstance(DefaultTestFilter.class);
}
示例2: createDistributions
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
@Defaults
void createDistributions(@Path("distributions") PlayDistributionContainer distributions, @Path("binaries") ModelMap<PlayApplicationBinarySpecInternal> playBinaries, PlayPluginConfigurations configurations, ServiceRegistry serviceRegistry) {
FileOperations fileOperations = serviceRegistry.get(FileOperations.class);
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
for (PlayApplicationBinarySpecInternal binary : playBinaries) {
PlayDistribution distribution = instantiator.newInstance(DefaultPlayDistribution.class, binary.getProjectScopedName(), fileOperations.copySpec(), binary);
distribution.setBaseName(binary.getProjectScopedName());
distributions.add(distribution);
}
}
示例3: getPluginRepositorySpec
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
private PluginRepositoriesSpec getPluginRepositorySpec() {
Instantiator instantiator = __scriptServices.get(Instantiator.class);
PluginRepositoryFactory pluginRepositoryFactory = __scriptServices.get(PluginRepositoryFactory.class);
PluginRepositoryRegistry pluginRepositoryRegistry = __scriptServices.get(PluginRepositoryRegistry.class);
return instantiator.newInstance(
DefaultPluginRepositoriesSpec.class, pluginRepositoryFactory, pluginRepositoryRegistry, getFileResolver());
}
示例4: DefaultMavenPublication
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public DefaultMavenPublication(
String name, MavenProjectIdentity projectIdentity, NotationParser<Object, MavenArtifact> mavenArtifactParser, Instantiator instantiator,
ProjectDependencyPublicationResolver projectDependencyResolver, FileCollectionFactory fileCollectionFactory
) {
this.name = name;
this.projectDependencyResolver = projectDependencyResolver;
this.projectIdentity = new DefaultMavenProjectIdentity(projectIdentity.getGroupId(), projectIdentity.getArtifactId(), projectIdentity.getVersion());
mavenArtifacts = instantiator.newInstance(DefaultMavenArtifactSet.class, name, mavenArtifactParser, fileCollectionFactory);
pom = instantiator.newInstance(DefaultMavenPom.class, this);
}
示例5: createPluginRepositoryFactory
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
DefaultPluginRepositoryFactory createPluginRepositoryFactory(PluginResolutionServiceResolver pluginResolutionServiceResolver, VersionSelectorScheme versionSelectorScheme,
final DependencyManagementServices dependencyManagementServices, final FileResolver fileResolver,
final DependencyMetaDataProvider dependencyMetaDataProvider, Instantiator instantiator,
final AuthenticationSchemeRegistry authenticationSchemeRegistry) {
final Factory<DependencyResolutionServices> dependencyResolutionServicesFactory = makeDependencyResolutionServicesFactory(
dependencyManagementServices, fileResolver, dependencyMetaDataProvider);
return instantiator.newInstance(
DefaultPluginRepositoryFactory.class, pluginResolutionServiceResolver,
dependencyResolutionServicesFactory, versionSelectorScheme, instantiator,
authenticationSchemeRegistry);
}
示例6: DefaultIvyPublication
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public DefaultIvyPublication(
String name, Instantiator instantiator, IvyPublicationIdentity publicationIdentity, NotationParser<Object, IvyArtifact> ivyArtifactNotationParser,
ProjectDependencyPublicationResolver projectDependencyResolver, FileCollectionFactory fileCollectionFactory
) {
this.name = name;
this.publicationIdentity = publicationIdentity;
this.projectDependencyResolver = projectDependencyResolver;
configurations = instantiator.newInstance(DefaultIvyConfigurationContainer.class, instantiator);
ivyArtifacts = instantiator.newInstance(DefaultIvyArtifactSet.class, name, ivyArtifactNotationParser, fileCollectionFactory);
ivyDependencies = instantiator.newInstance(DefaultIvyDependencySet.class);
descriptor = instantiator.newInstance(DefaultIvyModuleDescriptorSpec.class, this);
}
示例7: registerFactoryForCustomNativePlatforms
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
@Defaults
public void registerFactoryForCustomNativePlatforms(PlatformContainer platforms, final Instantiator instantiator) {
NamedDomainObjectFactory<NativePlatform> nativePlatformFactory = new NamedDomainObjectFactory<NativePlatform>() {
public NativePlatform create(String name) {
return instantiator.newInstance(DefaultNativePlatform.class, name);
}
};
platforms.registerFactory(NativePlatform.class, nativePlatformFactory);
platforms.registerFactory(Platform.class, nativePlatformFactory);
}
示例8: JavaPluginConvention
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public JavaPluginConvention(ProjectInternal project, Instantiator instantiator) {
this.project = project;
sourceSets = instantiator.newInstance(DefaultSourceSetContainer.class, project.getFileResolver(), project.getTasks(), instantiator,
project.getServices().get(SourceDirectorySetFactory.class));
dependencyCacheDirName = "dependency-cache";
docsDirName = "docs";
testResultsDirName = "test-results";
testReportDirName = "tests";
}
示例9: platforms
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
@Model
PlatformContainer platforms(Instantiator instantiator) {
return instantiator.newInstance(DefaultPlatformContainer.class, instantiator);
}
示例10: container
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public <T> NamedDomainObjectContainer<T> container(Class<T> type, Closure factoryClosure) {
Instantiator instantiator = getServices().get(Instantiator.class);
return instantiator.newInstance(FactoryNamedDomainObjectContainer.class, type, instantiator, new DynamicPropertyNamer(), factoryClosure);
}
示例11: DefaultVisualStudioProject
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
public DefaultVisualStudioProject(ComponentSpecIdentifier componentIdentifier, NativeComponentSpec component, PathToFileResolver fileResolver, Instantiator instantiator) {
super(componentIdentifier, VisualStudioProject.class);
this.component = component;
projectFile = instantiator.newInstance(DefaultConfigFile.class, fileResolver, getName() + ".vcxproj");
filtersFile = instantiator.newInstance(DefaultConfigFile.class, fileResolver, getName() + ".vcxproj.filters");
}
示例12: createPluginManager
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
PluginManagerInternal createPluginManager(Instantiator instantiator, GradleInternal gradleInternal, PluginRegistry pluginRegistry, DependencyInjectingInstantiator.ConstructorCache constructorCache) {
PluginApplicator applicator = new ImperativeOnlyPluginApplicator<Gradle>(gradleInternal);
return instantiator.newInstance(DefaultPluginManager.class, pluginRegistry, new DependencyInjectingInstantiator(this, constructorCache), applicator);
}
示例13: createConfigurationAttributesSchema
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
AttributesSchema createConfigurationAttributesSchema(Instantiator instantiator) {
return instantiator.newInstance(DefaultAttributesSchema.class);
}
示例14: createRepositoryHandler
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
RepositoryHandler createRepositoryHandler(Instantiator instantiator, BaseRepositoryFactory baseRepositoryFactory) {
return instantiator.newInstance(DefaultRepositoryHandler.class, baseRepositoryFactory, instantiator);
}
示例15: createPluginManager
import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
protected PluginManagerInternal createPluginManager(Instantiator instantiator, PluginRegistry pluginRegistry, DependencyInjectingInstantiator.ConstructorCache cachedConstructors) {
PluginApplicator applicator = new ImperativeOnlyPluginApplicator<SettingsInternal>(settings);
return instantiator.newInstance(DefaultPluginManager.class, pluginRegistry, new DependencyInjectingInstantiator(this, cachedConstructors), applicator);
}