com.android.annotations.Nullable.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中com.android.annotations.Nullable.<init>()方法的一些代码示例,展示了Nullable.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable.<init>()方法的具体详情如下:
包路径:com.android.annotations.Nullable
类名称:Nullable
方法名:<init>

Nullable.<init>介绍

暂无

代码示例

代码示例来源:origin: simpligility/android-maven-plugin

public static Collection< Artifact > filterArtifacts( @NonNull Iterable< Artifact > artifacts,
    final boolean skipDependencies, @Nullable final Collection< String > includeArtifactTypes,
    @Nullable final Collection< String > excludeArtifactTypes,
    @Nullable final Collection< String > includeArtifactQualifiers,
    @Nullable final Collection< String > excludeArtifactQualifiers )

代码示例来源:origin: com.android.tools.lint/lint

@Nullable
@Override
public PsiAnnotation findAnnotation(@NonNull String s) {
  return null;
}

代码示例来源:origin: com.android.tools.lint/lint-api

/**
 * Parse the file pointed to by the given context and return as a Document
 *
 * @param context the context pointing to the file to be parsed, typically
 *            via {@link Context#getContents()} but the file handle (
 *            {@link Context#file} can also be used to map to an existing
 *            editor buffer in the surrounding tool, etc)
 * @return the parsed DOM document, or null if parsing fails
 */
@Nullable
public abstract Document parseXml(@NonNull XmlContext context);

代码示例来源:origin: com.android.tools.lint/lint-api

/**
 * Sets the severity to be used for this issue.
 *
 * @param issue the issue to set the severity for
 * @param severity the severity to associate with this issue, or null to
 *            reset the severity to the default
 */
public abstract void setSeverity(@NonNull Issue issue, @Nullable Severity severity);

代码示例来源:origin: com.android.tools.lint/lint-api

/**
 * Returns the fully qualified name of the parent view, or null if the view
 * is the root android.view.View class.
 *
 * @param fqcn the fully qualified class name of the view
 * @return the fully qualified class name of the parent view, or null
 */
@Nullable
public abstract String getParentViewClass(@NonNull String fqcn);

代码示例来源:origin: com.android.tools.build/builder

/**
 * Sets the proguard output file. See
 * {@link AbstractAapt#validatePackageConfig(AaptPackageConfig)} for details on field rules.
 *
 * @param proguardOutputFile the proguard output file
 * @return {@code this}
 */
@NonNull
public Builder setProguardOutputFile(@Nullable File proguardOutputFile) {
  mConfig.mProguardOutputFile = proguardOutputFile;
  return this;
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Sets the build tool information. See
 * {@link AbstractAapt#validatePackageConfig(AaptPackageConfig)} for details on field rules.
 *
 * @param buildToolInfo the build tool information
 * @return {@code this}
 */
@NonNull
public Builder setBuildToolInfo(@Nullable BuildToolInfo buildToolInfo) {
  mConfig.mBuildToolInfo = buildToolInfo;
  return this;
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Sets the base feature APK file.
 *
 * @param baseFeature the base feature APK file.
 * @return {@code this}
 */
@NonNull
public Builder setBaseFeature(@Nullable File baseFeature) {
  mConfig.mBaseFeature = baseFeature;
  return this;
}

代码示例来源:origin: com.android.tools.build/builder

/** Append a span record to the build profile. Thread safe. */
  void writeRecord(
      @NonNull String project,
      @Nullable String variant,
      @NonNull final GradleBuildProfileSpan.Builder executionRecord);
}

代码示例来源:origin: com.android.tools.build/manifest-merger

@Nullable
  @Override
  public String merge(@NonNull String higherPriority, @NonNull String lowerPriority) {
    return higherPriority;
  }
};

代码示例来源:origin: com.android.tools.lint/lint-tests

@Override
  public void setSeverity(@NonNull Issue issue, @Nullable Severity severity) {
    fail("Not supported in tests.");
  }
}

代码示例来源:origin: com.android.tools.lint/lint-api

@SuppressWarnings({"UnusedParameters", "unused", "javadoc"})
public void visitConstructor(
    @NonNull JavaContext context,
    @Nullable JavaElementVisitor visitor,
    @NonNull PsiNewExpression node,
    @NonNull PsiMethod constructor) {
}

代码示例来源:origin: com.android.tools.build/builder

public ShardedTestListener(int shard, @NonNull String deviceName,
    @NonNull String projectName, @NonNull String flavorName, @Nullable ILogger logger) {
  super(deviceName, projectName, flavorName, logger);
  name = "TEST-" + deviceName + "-" + projectName + "-" + flavorName
      + "-shard-" + shard + ".xml";
}

代码示例来源:origin: com.android.tools.build/builder

private DxDexKey(
    @NonNull File sourceFile,
    @NonNull Revision buildToolsRevision,
    boolean jumboMode,
    boolean optimize,
    @NonNull Iterable<String> additionalParameters,
    @Nullable Boolean isMultiDex) {
  super(sourceFile, buildToolsRevision, jumboMode, optimize);
  mAdditionalParameters = ImmutableSortedSet.copyOf(additionalParameters);;
  mIsMultiDex = isMultiDex;
}

代码示例来源:origin: com.android.tools.build/manifest-merger

@Override
@Nullable
public String getKey(@NonNull Element xmlElement) {
  String key = mNamespaceUri == null
    ? xmlElement.getAttribute(mAttributeName)
    : xmlElement.getAttributeNS(mNamespaceUri, mAttributeName);
  if (Strings.isNullOrEmpty(key)) return null;
  return key;
}

代码示例来源:origin: com.android.tools.build/builder

public AtomDependency(
    @NonNull File artifactFile,
    @NonNull MavenCoordinates coordinates,
    @NonNull String name,
    @Nullable String projectPath,
    @NonNull File extractedFolder,
    @NonNull String atomName,
    @Nullable String variant) {
  super(artifactFile, coordinates, name, projectPath, extractedFolder, variant);
  this.atomName = atomName;
  hashCode = computeHashCode();
}

代码示例来源:origin: com.android.tools.lint/lint

@Nullable
@Override
public PsiType getOwner(@NonNull PsiAnnotation psiAnnotation) {
  throw new UnimplementedLintPsiApiException();
}

代码示例来源:origin: com.android.tools.lint/lint

@Nullable
public ResolvedAnnotation getAnnotation(@NonNull ResolvedField field, @NonNull String type) {
  for (AnnotationsDatabase database : databases) {
    ResolvedAnnotation annotation = database.getAnnotation(field, type);
    if (annotation != null) {
      return annotation;
    }
  }
  return null;
}

代码示例来源:origin: com.android.tools.lint/lint

@Nullable
private FieldInfo findField(@NonNull FieldBinding field) {
  ClassInfo c = findClass(field.declaringClass);
  if (c == null) {
    return null;
  }
  if (c.fields == null) {
    return null;
  }
  // TODO: Iterate over possibilities instead of making new string?
  return c.fields.get(new String(field.name));
}

代码示例来源:origin: com.android.tools.lint/lint

@Nullable
@Override
public Node findNodeAt(@NonNull XmlContext context, int offset) {
  return PositionXmlParser.findNodeAtOffset(context.document, offset);
}

相关文章

Nullable类方法