本文整理汇总了Java中org.gradle.internal.reflect.Instantiator类的典型用法代码示例。如果您正苦于以下问题:Java Instantiator类的具体用法?Java Instantiator怎么用?Java Instantiator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Instantiator类属于org.gradle.internal.reflect包,在下文中一共展示了Instantiator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createExtendsion
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public AtlasExtension createExtendsion(Project project, Instantiator instantiator) {
AtlasExtension atlasExtension = getExtendsion(project);
if (null != atlasExtension) {
return atlasExtension;
}
final NamedDomainObjectContainer<TBuildType> buildTypeContainer = project.container(TBuildType.class,
new TBuildTypeFactory(
instantiator, project,
project.getLogger()));
final NamedDomainObjectContainer<PatchConfig> patchConfigContainer = project.container(PatchConfig.class,
new PatchConfigFactory(
instantiator,
project, project
.getLogger()));
final NamedDomainObjectContainer<DexConfig>dexConfigContainer = project.container(DexConfig.class,new DexConfigFactory(instantiator,project,project.getLogger()));
return project.getExtensions().create("atlas", AtlasExtension.class, project, instantiator,
buildTypeContainer, patchConfigContainer,dexConfigContainer);
}
示例2: DefaultBaseRepositoryFactory
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultBaseRepositoryFactory(LocalMavenRepositoryLocator localMavenRepositoryLocator,
FileResolver fileResolver,
Instantiator instantiator,
RepositoryTransportFactory transportFactory,
LocallyAvailableResourceFinder<ModuleComponentArtifactMetadata> locallyAvailableResourceFinder,
FileStore<ModuleComponentArtifactIdentifier> artifactFileStore,
MetaDataParser<MutableMavenModuleResolveMetadata> pomParser,
AuthenticationSchemeRegistry authenticationSchemeRegistry,
IvyContextManager ivyContextManager) {
this.localMavenRepositoryLocator = localMavenRepositoryLocator;
this.fileResolver = fileResolver;
this.instantiator = instantiator;
this.transportFactory = transportFactory;
this.locallyAvailableResourceFinder = locallyAvailableResourceFinder;
this.artifactFileStore = artifactFileStore;
this.pomParser = pomParser;
this.authenticationSchemeRegistry = authenticationSchemeRegistry;
this.ivyContextManager = ivyContextManager;
}
示例3: createBaseRepositoryFactory
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
BaseRepositoryFactory createBaseRepositoryFactory(LocalMavenRepositoryLocator localMavenRepositoryLocator, Instantiator instantiator, FileResolver fileResolver,
RepositoryTransportFactory repositoryTransportFactory, LocallyAvailableResourceFinder<ModuleComponentArtifactMetadata> locallyAvailableResourceFinder,
ArtifactIdentifierFileStore artifactIdentifierFileStore,
VersionSelectorScheme versionSelectorScheme,
AuthenticationSchemeRegistry authenticationSchemeRegistry,
IvyContextManager ivyContextManager) {
return new DefaultBaseRepositoryFactory(
localMavenRepositoryLocator,
fileResolver,
instantiator,
repositoryTransportFactory,
locallyAvailableResourceFinder,
artifactIdentifierFileStore,
new GradlePomModuleDescriptorParser(versionSelectorScheme),
authenticationSchemeRegistry,
ivyContextManager
);
}
示例4: createConfigurationContainer
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
ConfigurationContainerInternal createConfigurationContainer(Instantiator instantiator, ConfigurationResolver configurationResolver, DomainObjectContext domainObjectContext,
ListenerManager listenerManager, DependencyMetaDataProvider metaDataProvider, ProjectAccessListener projectAccessListener,
ProjectFinder projectFinder, ConfigurationComponentMetaDataBuilder metaDataBuilder, FileCollectionFactory fileCollectionFactory,
GlobalDependencyResolutionRules globalDependencyResolutionRules, ComponentIdentifierFactory componentIdentifierFactory, BuildOperationExecutor buildOperationExecutor) {
return instantiator.newInstance(DefaultConfigurationContainer.class,
configurationResolver,
instantiator,
domainObjectContext,
listenerManager,
metaDataProvider,
projectAccessListener,
projectFinder,
metaDataBuilder,
fileCollectionFactory,
globalDependencyResolutionRules.getDependencySubstitutionRules(),
componentIdentifierFactory,
buildOperationExecutor
);
}
示例5: AtlasExtension
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public AtlasExtension(@NonNull final ProjectInternal project,
@NonNull Instantiator instantiator,
@NonNull NamedDomainObjectContainer<T> buildTypes,
@NonNull NamedDomainObjectContainer<PatchConfig> patchConfigs,
@NonNull NamedDomainObjectContainer<DexConfig>dexConfigs) {
logger = Logging.getLogger(this.getClass());
this.project = project;
this.patchConfigs = patchConfigs;
this.dexConfigs = dexConfigs;
this.buildTypes = buildTypes;
this.multiDexConfigs = project.container(MultiDexConfig.class, new MultiDexConfigFactory(
instantiator,project, project.getLogger()));
tBuildConfig = (Z) instantiator.newInstance(TBuildConfig.class);
manifestOptions = instantiator.newInstance(ManifestOptions.class);
bundleConfig = instantiator.newInstance(BundleConfig.class);
}
示例6: DefaultScriptPluginFactory
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultScriptPluginFactory(ScriptCompilerFactory scriptCompilerFactory,
Factory<LoggingManagerInternal> loggingManagerFactory,
Instantiator instantiator,
ScriptHandlerFactory scriptHandlerFactory,
PluginRequestApplicator pluginRequestApplicator,
FileLookup fileLookup,
DirectoryFileTreeFactory directoryFileTreeFactory,
DocumentationRegistry documentationRegistry,
ModelRuleSourceDetector modelRuleSourceDetector,
PluginRepositoryRegistry pluginRepositoryRegistry,
PluginRepositoryFactory pluginRepositoryFactory) {
this.scriptCompilerFactory = scriptCompilerFactory;
this.loggingManagerFactory = loggingManagerFactory;
this.instantiator = instantiator;
this.scriptHandlerFactory = scriptHandlerFactory;
this.pluginRequestApplicator = pluginRequestApplicator;
this.fileLookup = fileLookup;
this.directoryFileTreeFactory = directoryFileTreeFactory;
this.documentationRegistry = documentationRegistry;
this.modelRuleSourceDetector = modelRuleSourceDetector;
this.pluginRepositoryRegistry = pluginRepositoryRegistry;
this.pluginRepositoryFactory = pluginRepositoryFactory;
}
示例7: addToolChain
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
@Defaults
public static void addToolChain(NativeToolChainRegistryInternal toolChainRegistry, ServiceRegistry serviceRegistry) {
final FileResolver fileResolver = serviceRegistry.get(FileResolver.class);
final ExecActionFactory execActionFactory = serviceRegistry.get(ExecActionFactory.class);
final Instantiator instantiator = serviceRegistry.get(Instantiator.class);
final OperatingSystem operatingSystem = serviceRegistry.get(OperatingSystem.class);
final BuildOperationProcessor buildOperationProcessor = serviceRegistry.get(BuildOperationProcessor.class);
final VisualStudioLocator visualStudioLocator = serviceRegistry.get(VisualStudioLocator.class);
final UcrtLocator ucrtLocator = serviceRegistry.get(UcrtLocator.class);
final WindowsSdkLocator windowsSdkLocator = serviceRegistry.get(WindowsSdkLocator.class);
toolChainRegistry.registerFactory(VisualCpp.class, new NamedDomainObjectFactory<VisualCpp>() {
public VisualCpp create(String name) {
return instantiator.newInstance(VisualCppToolChain.class, name, buildOperationProcessor, operatingSystem, fileResolver, execActionFactory, visualStudioLocator, windowsSdkLocator, ucrtLocator, instantiator);
}
});
toolChainRegistry.registerDefaultToolChain(VisualCppToolChain.DEFAULT_NAME, VisualCpp.class);
}
示例8: DefaultReportContainer
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultReportContainer(Class<? extends T> type, Instantiator instantiator) {
super(type, instantiator, Report.NAMER);
enabled = matching(new Spec<T>() {
public boolean isSatisfiedBy(T element) {
return element.isEnabled();
}
});
beforeChange(new Runnable() {
public void run() {
throw new ImmutableViolationException();
}
});
}
示例9: DefaultTaskContainer
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultTaskContainer(MutableModelNode modelNode, ProjectInternal project, Instantiator instantiator, ITaskFactory taskFactory, ProjectAccessListener projectAccessListener) {
super(Task.class, instantiator, project);
this.modelNode = modelNode;
this.taskFactory = taskFactory;
this.projectAccessListener = projectAccessListener;
this.instantiator = new TaskInstantiator(taskFactory);
}
示例10: BinaryInfo
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
private BinaryInfo(ComponentSpecIdentifier componentId, Class<? extends BinarySpec> publicType, MutableModelNode modelNode, MutableModelNode componentNode, ITaskFactory taskFactory, Instantiator instantiator) {
this.componentId = componentId;
this.publicType = publicType;
this.modelNode = modelNode;
this.componentNode = componentNode;
this.taskFactory = taskFactory;
this.instantiator = instantiator;
}
示例11: DefaultTaskContainerFactory
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultTaskContainerFactory(ModelRegistry modelRegistry, Instantiator instantiator, ITaskFactory taskFactory, Project project, ProjectAccessListener projectAccessListener) {
this.modelRegistry = modelRegistry;
this.instantiator = instantiator;
this.taskFactory = taskFactory;
this.project = project;
this.projectAccessListener = projectAccessListener;
}
示例12: visualStudio
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
@Model
public static VisualStudioExtensionInternal visualStudio(ServiceRegistry serviceRegistry, ProjectIdentifier projectIdentifier) {
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
ProjectModelResolver projectModelResolver = serviceRegistry.get(ProjectModelResolver.class);
FileResolver fileResolver = serviceRegistry.get(FileResolver.class);
return instantiator.newInstance(DefaultVisualStudioExtension.class, projectIdentifier, instantiator, projectModelResolver, fileResolver);
}
示例13: DefaultTestLoggingContainer
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
public DefaultTestLoggingContainer(Instantiator instantiator) {
for (LogLevel level: LogLevel.values()) {
perLevelTestLogging.put(level, instantiator.newInstance(DefaultTestLogging.class));
}
setEvents(EnumSet.of(TestLogEvent.FAILED));
setExceptionFormat(TestExceptionFormat.SHORT);
getInfo().setEvents(EnumSet.of(TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR));
getInfo().setStackTraceFilters(EnumSet.of(TestStackTraceFilter.TRUNCATE));
getDebug().setEvents(EnumSet.allOf(TestLogEvent.class));
getDebug().setMinGranularity(0);
getDebug().setStackTraceFilters(EnumSet.noneOf(TestStackTraceFilter.class));
}
示例14: 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);
}
}
示例15: MavenPublishPlugin
import org.gradle.internal.reflect.Instantiator; //导入依赖的package包/类
@Inject
public MavenPublishPlugin(Instantiator instantiator, DependencyMetaDataProvider dependencyMetaDataProvider, FileResolver fileResolver,
ProjectDependencyPublicationResolver projectDependencyResolver, FileCollectionFactory fileCollectionFactory) {
this.instantiator = instantiator;
this.dependencyMetaDataProvider = dependencyMetaDataProvider;
this.fileResolver = fileResolver;
this.projectDependencyResolver = projectDependencyResolver;
this.fileCollectionFactory = fileCollectionFactory;
}