本文整理了Java中com.android.annotations.Nullable
类的一些代码示例,展示了Nullable
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable
类的具体详情如下:
包路径:com.android.annotations.Nullable
类名称:Nullable
暂无
代码示例来源: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: uber/okbuck
/**
* Determine the method names we are interested in for this check.
*
* @return a list representing the method names to check
*/
@Nullable
@Override
public List<String> getApplicableMethodNames() {
return Collections.singletonList(CHECK_METHOD_TO_EXCLUDE);
}
代码示例来源:origin: simpligility/android-maven-plugin
@Override
public void error( @Nullable Throwable throwable, @Nullable String s, Object... objects )
{
if ( ( throwable != null ) && ( s != null ) )
{
final Formatter formatter = new Formatter();
log.error( formatter.format( s, objects ).out().toString(), throwable );
}
else if ( ( throwable == null ) && ( s == null ) )
{
// do nothing.
}
else if ( throwable != null )
{
log.error( throwable );
}
else
{
final Formatter formatter = new Formatter();
log.error( formatter.format( s, objects ).out().toString() );
}
}
代码示例来源:origin: com.android.tools.build/gradle-core
public MethodSpecification(
@NonNull NameSpecification nameSpecification,
@Nullable ModifierSpecification modifiers,
@Nullable AnnotationSpecification annotationType) {
mNameSpecification = nameSpecification;
mModifiers = modifiers;
mAnnotationType = annotationType;
}
代码示例来源:origin: simpligility/android-maven-plugin
public AndroidSdk( File sdkPath, String apiLevel, @Nullable String buildToolsVersion )
{
this.sdkPath = sdkPath;
this.buildToolsVersion = buildToolsVersion;
this.progressIndicator = new ProgressIndicatorImpl();
if ( sdkPath != null )
{
sdkManager = AndroidSdkHandler.getInstance( sdkPath );
platformToolsPath = new File( sdkPath, SdkConstants.FD_PLATFORM_TOOLS );
toolsPath = new File( sdkPath, SdkConstants.FD_TOOLS );
if ( sdkManager == null )
{
throw invalidSdkException( sdkPath, apiLevel );
}
}
loadSDKToolsMajorVersion();
if ( apiLevel == null )
{
apiLevel = DEFAULT_ANDROID_API_LEVEL;
}
androidTarget = findPlatformByApiLevel( apiLevel );
if ( androidTarget == null )
{
throw invalidSdkException( sdkPath, apiLevel );
}
}
代码示例来源:origin: com.amazon.device.tools.build/builder
public JarDependency(
@NonNull File jarFile,
boolean compiled,
boolean packaged,
@Nullable MavenCoordinates resolvedCoordinates,
@Nullable String projectPath) {
this(jarFile, compiled, packaged, true, resolvedCoordinates, projectPath);
}
代码示例来源:origin: com.android.tools/repository
/**
* @see File#list(FilenameFilter)
*/
@Nullable
String[] list(@NonNull File folder, @Nullable FilenameFilter filenameFilter);
代码示例来源:origin: com.amazon.device.tools.build/gradle-core
public JavaLibraryImpl(
@NonNull File jarFile,
@Nullable MavenCoordinates requestedCoordinates,
@Nullable MavenCoordinates resolvedCoordinates) {
super(requestedCoordinates, resolvedCoordinates);
this.jarFile = jarFile;
}
代码示例来源: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/gradle-core
public SyncIssueImpl(int type, int severity, @Nullable String data, @NonNull String message) {
this.type = type;
this.severity = severity;
this.data = data;
this.message = message;
}
代码示例来源:origin: com.android.tools.build/gradle-core
private AnnotationData(@NonNull String name, @Nullable MemberValuePair[] pairs) {
this(name);
attributes = pairs;
assert attributes == null || attributes.length > 0;
}
代码示例来源:origin: com.android.tools/repository
/**
* Gets an {@link LSResourceResolver} that can find the XSDs for all versions of the
* currently-registered {@link SchemaModule}s by namespace. Returns null if there is an error.
*/
@Nullable
public abstract LSResourceResolver getResourceResolver(@NonNull ProgressIndicator progress);
代码示例来源: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;
}
};
内容来源于网络,如有侵权,请联系作者删除!