本文整理了Java中org.jetbrains.annotations.NotNull.<init>()
方法的一些代码示例,展示了NotNull.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NotNull.<init>()
方法的具体详情如下:
包路径:org.jetbrains.annotations.NotNull
类名称:NotNull
方法名:<init>
暂无
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
@Override
public AdditionalDataConfigurable createAdditionalDataConfigurable(@NotNull SdkModel sdkModel, @NotNull SdkModificator sdkModificator) {
return null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
@Override
public final ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) {
throw new IllegalStateException();
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
protected abstract GoExecutor createExecutor(@NotNull Project project,
@Nullable Module module,
@NotNull String title,
@NotNull String filePath);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
@Override
public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, @NotNull PsiElement[] elements)
throws IncorrectOperationException {
return surroundWithParenthesis(elements, false);
}
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
@Override
protected TextRange surroundStatements(@NotNull Project project,
@NotNull PsiElement container,
@NotNull PsiElement[] statements) throws IncorrectOperationException {
return surroundStatementsWithIfElse(project, container, statements, false);
}
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
public static Collection<GoFunctionDeclaration> find(@NotNull String name,
@NotNull Project project,
@Nullable GlobalSearchScope scope,
@Nullable IdFilter idFilter) {
return StubIndex.getElements(KEY, name, project, scope, idFilter, GoFunctionDeclaration.class);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
@Override
protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull VirtualFile file) {
return super.createExecutor(project, module, title, file.isDirectory() ? file : file.getParent());
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
public static GoImportSpec getImportSpec(@NotNull PsiElement importEntry) {
return PsiTreeUtil.getNonStrictParentOfType(importEntry, GoImportSpec.class);
}
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
public static GoType getGoTypeInner(@NotNull GoAnonymousFieldDefinition o,
@SuppressWarnings("UnusedParameters") @Nullable ResolveState context) {
return o.getType();
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
@Override
public DlvResponse readIfHasSequence(@NotNull JsonReaderEx message) {
return new DlvResponse.CommandResponseImpl(message, null);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
@Override
public CoverageEnabledConfiguration createCoverageEnabledConfiguration(@Nullable RunConfigurationBase conf) {
return new GoCoverageEnabledConfiguration((GoTestRunConfiguration)conf);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
public static String getLocalUrlToElement(@NotNull PsiElement element) {
if (element instanceof GoTypeSpec || element instanceof PsiDirectory) {
return getReferenceText(element, true);
}
return null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
public static boolean processChildren(@NotNull PsiElement element,
@NotNull PsiScopeProcessor processor,
@NotNull ResolveState substitutor,
@Nullable PsiElement lastParent,
@NotNull PsiElement place) {
PsiElement run = lastParent == null ? element.getLastChild() : lastParent.getPrevSibling();
while (run != null) {
if (run instanceof GoCompositeElement && !run.processDeclarations(processor, substitutor, null, place)) return false;
run = run.getPrevSibling();
}
return true;
}
代码示例来源:origin: skylot/jadx
@Deprecated
@Nullable
public MethodNode resolveMethod(@NotNull MethodInfo mth) {
ClassNode cls = resolveClass(mth.getDeclClass());
if (cls != null) {
return cls.searchMethod(mth);
}
return null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
private static void error(@NotNull String title, @NotNull Project project, @Nullable Exception ex) {
String message = ex == null ? "" : ExceptionUtil.getUserStackTrace(ex, LOG);
NotificationType type = NotificationType.ERROR;
Notifications.Bus.notify(GoConstants.GO_EXECUTION_NOTIFICATION_GROUP.createNotification(title, message, type, null), project);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
private static GoCompositeLit getStructLiteralByReference(@NotNull GoReferenceExpression fieldReferenceExpression,
@NotNull GoAssignmentStatement assignment) {
GoStatement previousStatement = PsiTreeUtil.getPrevSiblingOfType(assignment, GoStatement.class);
if (previousStatement instanceof GoSimpleStatement) {
return getStructLiteral(fieldReferenceExpression, (GoSimpleStatement)previousStatement);
}
if (previousStatement instanceof GoAssignmentStatement) {
return getStructLiteral(fieldReferenceExpression, (GoAssignmentStatement)previousStatement);
}
return null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
private boolean processTypeRef(@Nullable GoType type, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {
if (type == null) {
return true;
}
if (builtin(type)) {
// do not process builtin types like 'int int' or 'string string'
return true;
}
return processInTypeRef(type.getTypeReferenceExpression(), processor, state);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
private static String getStatementsCoverageString(@NotNull FileCoverageInfo info) {
double percent = calcPercent(info.coveredLineCount, info.totalLineCount);
return info.totalLineCount > 0 ? new DecimalFormat("##.#" + STATEMENTS_SUFFIX, DecimalFormatSymbols.getInstance(Locale.US))
.format(percent) : null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@Nullable
private static String getFilesCoverageString(@NotNull DirCoverageInfo info) {
double percent = calcPercent(info.coveredFilesCount, info.totalFilesCount);
return info.totalFilesCount > 0
? new DecimalFormat("##.#" + FILES_SUFFIX, DecimalFormatSymbols.getInstance(Locale.US)).format(percent)
: null;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
@Override
protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull String filePath) {
VirtualFile executable = getExecutable(project, module);
assert executable != null;
return GoExecutor.in(project, module).withExePath(executable.getPath()).withParameters("-w", filePath).showOutputOnError();
}
}
内容来源于网络,如有侵权,请联系作者删除!