net.digitalid.utility.circumfixes.Quotes.inSingle()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(94)

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

Quotes.inSingle介绍

[英]Returns the given object in single quotes.
[中]以单引号返回给定对象。

代码示例

代码示例来源:origin: net.digitalid.utility/utility-initialization

@Pure
@Override
public @Nonnull String toString() {
  return Quotes.inSingle(getClass().getSimpleName());
}

代码示例来源:origin: net.digitalid.utility/utility-generator

@Override
public @Nonnull String getAccessCode() {
  throw new UnsupportedOperationException("Non-accessible field " + Quotes.inSingle(getName()) + " does not have an access code.");
}

代码示例来源:origin: net.digitalid.utility/utility-initialization

/**
 * Returns the configuration field of the declared type in the given annotation value or null if no field fulfilling the criteria is found.
 */
@Pure
protected @Nullable VariableElement getConfigurationField(@Nonnull AnnotationValue annotationValue) {
  final @Nonnull DeclaredType declaredType = (DeclaredType) annotationValue.getValue();
  ProcessingLog.debugging("The declared type is " + Quotes.inSingle(declaredType));
  final @Nonnull TypeElement typeElement = (TypeElement) declaredType.asElement();
  return ProcessingUtility.getFirstPublicStaticFieldOfType(typeElement, Configuration.class);
}

代码示例来源:origin: net.digitalid.utility/utility-processor

/**
 * Adds the provider with the given qualified binary name to the list of providers for the specified service.
 * 
 * @param qualifiedProviderName the name has to be in binary form (i.e. with a dollar sign for inner classes).
 */
@Impure
@NonWrittenRecipient
public void addProvider(@Nonnull String qualifiedProviderName) {
  requireNotWritten();
  
  qualifiedProviderNames.add(qualifiedProviderName);
  ProcessingLog.information("Added the provider " + Quotes.inSingle(qualifiedProviderName) + " for the service " + Quotes.inSingle(service.getName()));
}

代码示例来源:origin: net.digitalid.utility/utility-validation

@Pure
@Override
public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) {
  return Contract.with("!isLockHeldByCurrentThread()", "The method " + Quotes.inSingle(element.getSimpleName().toString()) + " may only be called by a thread that does not hold the lock.");
}

代码示例来源:origin: net.digitalid.utility/utility-processing

@Pure
@Override
public @Nonnull String visitChar(char value, @NonCaptured @Modified @Nullable TypeImporter typeImporter) {
  return Quotes.inSingle(String.valueOf(value));
}

代码示例来源:origin: net.digitalid.utility/utility-threading

@Pure
@Override
public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) {
  return Contract.with(typeImporter.importIfPossible(Threading.class) + ".isMainThread()", "The method " + Quotes.inSingle(element.getSimpleName().toString()) + " may only be called on the main thread.");
}

代码示例来源:origin: net.digitalid.utility/utility-generator

@Impure
@Override
public void processFirstRound(@Nonnull FiniteIterable<@Nonnull ? extends TypeElement> annotations, @Nonnull RoundEnvironment roundEnvironment) {
  ProcessingLog.information("The code is generated in " + (StaticProcessingEnvironment.environment.get().getOptions().containsKey("production") ? "production" : "development" ) + " mode.");
  for (@Nonnull Element rootElement : roundEnvironment.getRootElements()) {
    ProcessingLog.information("Processing element $ of kind $", rootElement.getSimpleName(), rootElement.getKind());
    if (rootElement.getKind() == ElementKind.CLASS || rootElement.getKind() == ElementKind.INTERFACE || rootElement.getKind() == ElementKind.ENUM) {
      ProcessingLog.debugging("Generate the classes for " + Quotes.inSingle(rootElement.getSimpleName()));
      final long start = System.currentTimeMillis();
      final boolean generated = generateClasses((TypeElement) rootElement, (DeclaredType) rootElement.asType());
      final long end = System.currentTimeMillis();
      ProcessingLog.debugging("Generated " + (generated ? "the" : "no") + " classes for " + Quotes.inSingle(rootElement.getSimpleName()) + " in " + (end - start) + " ms.\n");
    } else {
      ProcessingLog.information("Not processing element $ of kind $", rootElement.getSimpleName(), rootElement.getKind());
    }
  }
}

代码示例来源:origin: net.digitalid.utility/utility-processor

ProcessingLog.information(getClass().getSimpleName() + " invoked" + (projectName.isEmpty() ? "" : " for project " + Quotes.inSingle(projectName)) + ":\n");

代码示例来源:origin: net.digitalid.utility/utility-generator

ProcessingLog.verbose("Implementing the setter " + Quotes.inSingle(setter.getName()));
if (normalize != null && setter.hasAnnotation(Normalize.class)) {
  ProcessingLog.warning("Found @Normalize annotation on getter and on setter. To avoid inconsistencies we are using the getter annotation. Please remove @Normalize from the setter.");

相关文章