当前位置: 首页>>代码示例>>Java>>正文


Java Instantiator.newInstance方法代码示例

本文整理汇总了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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:18,代码来源:Test.java

示例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);
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:PlayDistributionPlugin.java

示例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());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:InitialPassSettingsScript.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:DefaultMavenPublication.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:PluginUsePluginServiceRegistry.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:DefaultIvyPublication.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:NativeComponentModelPlugin.java

示例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";
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:JavaPluginConvention.java

示例9: platforms

import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
@Model
PlatformContainer platforms(Instantiator instantiator) {
    return instantiator.newInstance(DefaultPlatformContainer.class, instantiator);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:ComponentModelBasePlugin.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:DefaultProject.java

示例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");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:DefaultVisualStudioProject.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:GradleScopeServices.java

示例13: createConfigurationAttributesSchema

import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
AttributesSchema createConfigurationAttributesSchema(Instantiator instantiator) {
    return instantiator.newInstance(DefaultAttributesSchema.class);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultDependencyManagementServices.java

示例14: createRepositoryHandler

import org.gradle.internal.reflect.Instantiator; //导入方法依赖的package包/类
RepositoryHandler createRepositoryHandler(Instantiator instantiator, BaseRepositoryFactory baseRepositoryFactory) {
    return instantiator.newInstance(DefaultRepositoryHandler.class, baseRepositoryFactory, instantiator);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultDependencyManagementServices.java

示例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);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:SettingsScopeServices.java


注:本文中的org.gradle.internal.reflect.Instantiator.newInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。