com.google.inject.internal.Annotations.memberValueString()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(156)

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

Annotations.memberValueString介绍

[英]Returns value, quoted if annotation implementations quote their member values. In Java 9, annotations quote their string members.
[中]返回值,如果注释实现引用其成员值,则将其引用。在Java9中,注释引用其字符串成员。

代码示例

代码示例来源:origin: com.google.inject/guice

@Override
public String toString() {
 return "@" + Named.class.getName() + "(value=" + Annotations.memberValueString(value) + ")";
}

代码示例来源:origin: com.google.inject.extensions/guice-assistedinject

@Override
 public String toString() {
  return "@"
    + Assisted.class.getName()
    + "(value="
    + Annotations.memberValueString("")
    + ")";
 }
};

代码示例来源:origin: org.sonatype.sisu.inject/guice-assistedinject

@Override
 public String toString() {
  return "@"
    + Assisted.class.getName()
    + "(value="
    + Annotations.memberValueString("")
    + ")";
 }
};

代码示例来源:origin: com.jwebmp.inject.extensions/guice-assistedinject

@Override
 public String toString() {
  return "@"
    + Assisted.class.getName()
    + "(value="
    + Annotations.memberValueString("")
    + ")";
 }
};

代码示例来源:origin: com.jwebmp.inject/guice

@Override
public String toString() {
 return "@" + Named.class.getName() + "(value=" + Annotations.memberValueString(value) + ")";
}

代码示例来源:origin: org.sonatype.sisu/sisu-guice

@Override
public String toString() {
 return "@" + Named.class.getName() + "(value=" + Annotations.memberValueString(value) + ")";
}

代码示例来源:origin: ru.vyarus/dropwizard-guicey

@Override
public String toString() {
  return "@" + Config.class.getName() + "(value=" + Annotations.memberValueString(val) + ")";
}

代码示例来源:origin: xvik/dropwizard-guicey

@Override
public String toString() {
  return "@" + Config.class.getName() + "(value=" + Annotations.memberValueString(val) + ")";
}

代码示例来源:origin: com.google.inject.extensions/guice-grapher

public void testGetAnnotationName_annotationInstanceWithParameters() throws Exception {
 Key<?> key = Key.get(String.class, Names.named("name"));
 assertEquals(
   "@Named(value=" + Annotations.memberValueString("name") + ")",
   nameFactory.getAnnotationName(key));
}

代码示例来源:origin: com.google.inject.extensions/guice-assistedinject

public void testDuplicateKeys() {
 try {
  Guice.createInjector(
    new AbstractModule() {
     @Override
     protected void configure() {
      bind(DoubleToneCarFactory.class)
        .toProvider(FactoryProvider.newFactory(DoubleToneCarFactory.class, Maxima.class));
     }
    });
  fail();
 } catch (CreationException expected) {
  assertContains(
    expected.getMessage(),
    "A binding to "
      + Color.class.getName()
      + " annotated with @"
      + Assisted.class.getName()
      + "(value="
      + Annotations.memberValueString("paint")
      + ") was already configured at");
 }
}

代码示例来源:origin: com.google.inject.extensions/guice-assistedinject

+ ">"
+ " annotated with @com.google.inject.assistedinject.Assisted(value="
+ Annotations.memberValueString("color")
+ ")]"
+ " on method ["

代码示例来源:origin: com.google.inject.extensions/guice-assistedinject

+ ">"
+ " annotated with @com.google.inject.assistedinject.Assisted(value="
+ Annotations.memberValueString("color")
+ ")]"
+ " on method ["

相关文章