當前位置: 首頁>>代碼示例>>Java>>正文


Java Value.Derived方法代碼示例

本文整理匯總了Java中org.immutables.value.Value.Derived方法的典型用法代碼示例。如果您正苦於以下問題:Java Value.Derived方法的具體用法?Java Value.Derived怎麽用?Java Value.Derived使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.immutables.value.Value的用法示例。


在下文中一共展示了Value.Derived方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: simple

import org.immutables.value.Value; //導入方法依賴的package包/類
@Override
@Value.Derived
public String simple() {
  return isNew()
      ? (NEW_KEYWORD + ' ' + forms().simple())
      : applied();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:Constitution.java

示例2: implementationVisibility

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
public Visibility implementationVisibility() {
  if (style().visibility() == ImplementationVisibility.PRIVATE
      && !protoclass().features().builder()
      && !protoclass().kind().isNested()) {
    protoclass()
        .report()
        .warning("effective Style.visibility cannot be PRIVATE when builder is disabled and is not nested,"
            + " automatically switching visibility to PACKAGE because top level implementation class is required");
    return Visibility.PACKAGE;
  }
  return protoclass().visibility().forImplementation(style().visibility());
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:14,代碼來源:Constitution.java

示例3: docEventsToCorpusEvents

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
public ImmutableMultimap<DocEventFrameReference, CorpusEventFrame> docEventsToCorpusEvents() {
  final ImmutableMultimap.Builder<DocEventFrameReference, CorpusEventFrame> ret =
      ImmutableMultimap.builder();

  for (final CorpusEventFrame corpusEventFrame : corpusEventFrames()) {
    for (final DocEventFrameReference docEventFrameReference : corpusEventFrame
        .docEventFrames()) {
      ret.put(docEventFrameReference, corpusEventFrame);
    }
  }

  return ret.build();
}
 
開發者ID:isi-nlp,項目名稱:tac-kbp-eal,代碼行數:15,代碼來源:_CorpusEventLinking.java

示例4: defaultStyles

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
StyleInfo defaultStyles() {
  @Nullable TypeElement element = findElement(StyleMirror.qualifiedName());
  if (element == null) {
    processing().getMessager()
        .printMessage(Diagnostic.Kind.MANDATORY_WARNING,
            "Could not found annotations on the compile classpath. It looks like annotation processor is running"
                + " in a separate annotation-processing classpath and unable to get to annotation definitions."
                + " To fix this, please add annotation-only artifact 'org.immutables:value:(version):annotations'"
                + " to 'compile' 'compileOnly' or 'provided' dependency scope.");

    element = findElement(StyleMirror.mirrorQualifiedName());
    verify(element != null, "Classpath should contain at least mirror annotation, otherwise library is corrupted");
  }
  try {
    return ToStyleInfo.FUNCTION.apply(StyleMirror.from(element));
  } catch (Exception ex) {
    processing().getMessager()
        .printMessage(Diagnostic.Kind.MANDATORY_WARNING,
            "The version of the Immutables annotation on the classpath has incompatible differences"
                + " from the Immutables annotation processor used. Various problems might occur,"
                + " like this one: "
                + ex);

    element = findElement(StyleMirror.mirrorQualifiedName());
    verify(element != null,
        "classpath should contain at least the mirror annotation, otherwise library is corrupted");
    return ToStyleInfo.FUNCTION.apply(StyleMirror.from(element));
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:31,代碼來源:Proto.java

示例5: visibility

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
public Visibility visibility() {
  return Visibility.of(sourceElement());
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:Proto.java

示例6: qualifiedName

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
String qualifiedName() {
  return element().getQualifiedName().toString();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:NullabilityAnnotationInfo.java

示例7: isTopLevel

import org.immutables.value.Value; //導入方法依賴的package包/類
/**
 * @return true, if is top level
 */
@Value.Derived
@Value.Auxiliary
public boolean isTopLevel() {
  return element().getNestingKind() == NestingKind.TOP_LEVEL;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:Proto.java

示例8: derived

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
default int derived() {
  return v1().or(0);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:Companion.java

示例9: a

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
default int a() {
  return 1;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:NonnullConstruction.java

示例10: getKeyword

import org.immutables.value.Value; //導入方法依賴的package包/類
@Override
@Value.Derived
public String getKeyword() {
    return "enum";
}
 
開發者ID:dzuvic,項目名稱:jtsgen,代碼行數:6,代碼來源:TSEnum.java

示例11: simpleName

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Auxiliary
@Value.Derived
public String simpleName() {
  return element().getSimpleName().toString();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:6,代碼來源:Proto.java

示例12: builderVisibility

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
public Visibility builderVisibility() {
  return protoclass().visibility().forBuilder(style().builderVisibility());
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:Constitution.java

示例13: docIDs

import org.immutables.value.Value; //導入方法依賴的package包/類
/**
 * @return A derived set from {@link #queryReponses()} of Document IDs
 */
@Value.Derived
public ImmutableSet<Symbol> docIDs() {
  return FluentIterable.from(queryReponses()).index(QueryResponse2016Functions.docID()).keySet();
}
 
開發者ID:isi-nlp,項目名稱:tac-kbp-eal,代碼行數:8,代碼來源:_CorpusQueryAssessments.java

示例14: simpleName

import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
String simpleName() {
  return element().getSimpleName().toString();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:NullabilityAnnotationInfo.java

示例15: getType

import org.immutables.value.Value; //導入方法依賴的package包/類
@Override
@Value.Derived
public TSTargetType getType() {
    return ENUM_MEMBER;
}
 
開發者ID:dzuvic,項目名稱:jtsgen,代碼行數:6,代碼來源:TSEnumMember.java


注:本文中的org.immutables.value.Value.Derived方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。