com.google.errorprone.annotations.Var.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(168)

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

Var.<init>介绍

暂无

代码示例

代码示例来源:origin: uber/okbuck

public String getBuckName() {
  @Var RuleType ruleType = this;
  switch (this) {
   case KOTLIN_ANDROID_LIBRARY:
   case ANDROID_LIBRARY:
    ruleType = ANDROID_LIBRARY;
    break;
   case KOTLIN_ROBOLECTRIC_TEST:
   case ROBOLECTRIC_TEST:
    ruleType = ROBOLECTRIC_TEST;
    break;
   default:
    break;
  }

  return ruleType.name().toLowerCase();
 }
}

代码示例来源:origin: uber/okbuck

private static Pair<String, String> getBashCommandAndTransformDeps(
  AndroidAppTarget target, Map<String, String> options) {
 String transformClass = options.get(OPT_TRANSFORM_CLASS);
 String configFile = options.get(OPT_CONFIG_FILE);
 StringBuilder bashCmd = new StringBuilder(PREFIX);
 @Var String configFileRule = null;
 if (transformClass != null) {
  bashCmd.append("-Dokbuck.transformClass=").append(transformClass).append(" ");
 }
 if (configFile != null) {
  configFileRule =
    getTransformConfigRuleForFile(
      target.getProject(), target.getRootProject().file(configFile));
  bashCmd.append("-Dokbuck.configFile=$(location ").append(configFileRule).append(") ");
 }
 bashCmd.append(SUFFIX);
 return Pair.of(bashCmd.toString(), configFileRule);
}

代码示例来源:origin: uber/okbuck

.collect(Collectors.joining(",\n"));
@Var
String nameExpr =
  names.stream().map(name -> "\"" + name + "\"").collect(Collectors.joining(", "));

代码示例来源:origin: uber/okbuck

@Nullable
 Target getTargetForVariant(@Nullable String variant) {
  @Var Target result = null;
  ProjectType type = ProjectUtil.getType(project);
  switch (type) {
   case ANDROID_LIB:
    result = getTargets().get(variant);
    if (result == null) {
     throw new IllegalStateException(
       "No target found for " + project.getDisplayName() + " for variant " + variant);
    }
    break;
   case GROOVY_LIB:
   case JAVA_LIB:
   case KOTLIN_LIB:
   case SCALA_LIB:
    result = getTargets().values().iterator().next();
    break;
   default:
    break;
  }
  return result;
 }
}

代码示例来源:origin: uber/okbuck

@Nullable
private Configuration getConfigurationFromVariant(@Nullable BaseVariant variant) {
 @Var Configuration configuration = null;
 if (isKapt) {
  configuration =
    getProject()
      .getConfigurations()
      .getByName("kapt" + StringUtils.capitalize(getBaseVariant().getName()));
 } else if (variant != null) {
  configuration = variant.getAnnotationProcessorConfiguration();
 }
 return configuration;
}

代码示例来源:origin: uber/okbuck

return null;
@Var String appClass = null;

代码示例来源:origin: uber/okbuck

@Var
boolean autoValueDependency =
  dependencySet

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code advice}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + advice.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code loggerName}, {@code partialMessage}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + loggerName.hashCode();
 h += (h << 5) + partialMessage.hashCode();
 return h;
}

代码示例来源:origin: uber/okbuck

@Var boolean hasKotlinExtension;
try {
 AndroidExtensionsExtension androidExtensions =

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code object}, {@code name}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + object.hashCode();
 h += (h << 5) + name.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code defaultThresholdNanos}, {@code thresholdNanos}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + Objects.hashCode(defaultThresholdNanos);
 h += (h << 5) + thresholdNanos.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code type}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + type.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code name}, {@code parameterTypes}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + name.hashCode();
 h += (h << 5) + parameterTypes.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

private int computeHashCode() {
 @Var int h = 5381;
 h += (h << 5) + name.hashCode();
 h += (h << 5) + parameterTypes.hashCode();
 h += (h << 5) + returnType.hashCode();
 h += (h << 5) + modifiers;
 h += (h << 5) + Objects.hashCode(signature);
 h += (h << 5) + exceptions.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code defaultThresholdNanos}, {@code thresholdNanos}, {@code userThresholds}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + Objects.hashCode(defaultThresholdNanos);
 h += (h << 5) + thresholdNanos.hashCode();
 h += (h << 5) + userThresholds.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code kind}, {@code type}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + kind.hashCode();
 h += (h << 5) + type.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code reweavable}, {@code nonReweavable}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + reweavable.hashCode();
 h += (h << 5) + nonReweavable.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code pluginJars}, {@code pluginDescriptors}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + pluginJars.hashCode();
 h += (h << 5) + pluginDescriptors.hashCode();
 return h;
}

代码示例来源:origin: glowroot/glowroot

/**
 * Computes a hash code from attributes: {@code https}, {@code targets}.
 * @return hashCode value
 */
@Override
public int hashCode() {
 @Var int h = 5381;
 h += (h << 5) + Booleans.hashCode(https);
 h += (h << 5) + targets.hashCode();
 return h;
}

相关文章

Var类方法