小编use*_*792的帖子

如何找到给定cmdlet的模块?

如何确定给定cmdlet的模块,以便从覆盖cmdlet的函数直接调用?

例如,我怎么能发现Start-Transcript存在于Microsoft.Powershell.Host?

Get-Module Start-Transcript
Run Code Online (Sandbox Code Playgroud)

不产生任何东西


更新以下答案.

这是输出:

PS C:\Windows> Get-Command -type cmdlet start-transcript | fl *

HelpUri             : http://go.microsoft.com/fwlink/?LinkID=113408
DLL                 : C:\Windows\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\1.0.0.0__31bf3856ad364e35\Microsoft
                      .PowerShell.ConsoleHost.dll
Verb                : Start
Noun                : Transcript
HelpFile            : Microsoft.PowerShell.ConsoleHost.dll-Help.xml
PSSnapIn            : Microsoft.PowerShell.Host
ImplementingType    : Microsoft.PowerShell.Commands.StartTranscriptCommand
Definition          : Start-Transcript [[-Path] <String>] [-Append] [-Force] [-NoClobber] [-Verbose] [-Debug] [-ErrorAc
                      tion <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningV
                      ariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]

DefaultParameterSet :
OutputType          : {}
Name                : Start-Transcript
CommandType         : Cmdlet
Visibility          : Public
ModuleName          : …
Run Code Online (Sandbox Code Playgroud)

powershell

18
推荐指数
2
解决办法
1万
查看次数

警告:在最后一轮中创建的类型为"[在此处插入类]"的文件不会受到注释处理

我将现有的代码库切换到Java 7,我不断收到此警告:

warning: File for type '[Insert class here]' created in the last round 
  will not be subject to annotation processing.
Run Code Online (Sandbox Code Playgroud)

快速搜索显示没有人发出此警告.

它没有在javac编译器源中记录:

从OpenJDK\langtools\src\share\classes\com\sun\tools\javac\processing\JavacFiler.java

private JavaFileObject createSourceOrClassFile(boolean isSourceFile, String name) throws IOException {
    checkNameAndExistence(name, isSourceFile);
    Location loc = (isSourceFile ? SOURCE_OUTPUT : CLASS_OUTPUT);
    JavaFileObject.Kind kind = (isSourceFile ?
                                JavaFileObject.Kind.SOURCE :
                                JavaFileObject.Kind.CLASS);

    JavaFileObject fileObject =
        fileManager.getJavaFileForOutput(loc, name, kind, null);
    checkFileReopening(fileObject, true);

    if (lastRound) // <-------------------------------TRIGGERS WARNING
        log.warning("proc.file.create.last.round", name);

    if (isSourceFile)
        aggregateGeneratedSourceNames.add(name);
    else
        aggregateGeneratedClassNames.add(name);
    openTypeNames.add(name);

    return new FilerOutputJavaFileObject(name, fileObject);
}
Run Code Online (Sandbox Code Playgroud)

这意味着什么以及我可以采取哪些步骤来清除此警告?

谢谢.

java java-7

15
推荐指数
2
解决办法
1606
查看次数

标签 统计

java ×1

java-7 ×1

powershell ×1