本文整理匯總了Java中org.immutables.value.Value.Auxiliary方法的典型用法代碼示例。如果您正苦於以下問題:Java Value.Auxiliary方法的具體用法?Java Value.Auxiliary怎麽用?Java Value.Auxiliary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.immutables.value.Value
的用法示例。
在下文中一共展示了Value.Auxiliary方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: encodings
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public Set<EncodingInfo> encodings() {
if (qualifiedName().endsWith("Enabled")
|| CustomImmutableAnnotations.annotations().contains(qualifiedName())
|| style().isPresent()) {
// See if it is encoding enabled itself
Optional<EncodingInfo> encoding = EncMetadataMirror.find(element()).transform(ENCODING_INFLATER);
if (encoding.isPresent()) {
return encoding.asSet();
}
// trying to find it as meta-meta annotation
List<EncodingInfo> result = new ArrayList<>();
for (AnnotationMirror m : element().getAnnotationMirrors()) {
MetaAnnotated metaAnnotated = MetaAnnotated.from(m, environment());
result.addAll(metaAnnotated.encodings());
}
if (!result.isEmpty()) {
return FluentIterable.from(result).toSet();
}
}
return ImmutableSet.of();
}
示例2: depluralize
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public Optional<String[]> depluralize() {
Optional<DepluralizeMirror> d = DepluralizeMirror.find(element());
if (d.isPresent()) {
return Optional.of(d.get().dictionary());
}
return Optional.absent();
}
示例3: cacheKey
import org.immutables.value.Value; //導入方法依賴的package包/類
@Override
@Value.Derived
@Value.Auxiliary
public String cacheKey() {
return metric();
}
示例4: readTimeout
import org.immutables.value.Value; //導入方法依賴的package包/類
/**
* How long to wait for reads
*/
@Value.Default
@Value.Auxiliary
public long readTimeout() {
return 10L;
}
示例5: aux
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Auxiliary
@Value.Default
public int aux() {
return 42;
}
示例6: username
import org.immutables.value.Value; //導入方法依賴的package包/類
/**
* @return username to authenticate against
*/
@Nullable
@Value.Auxiliary
public abstract String username();
示例7: environment
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Parameter
@Value.Auxiliary
public abstract Environment environment();
示例8: style
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public Optional<StyleInfo> style() {
return StyleMirror.find(element()).transform(ToStyleInfo.FUNCTION);
}
示例9: threshold
import org.immutables.value.Value; //導入方法依賴的package包/類
@Nullable
@Value.Auxiliary
public abstract Double threshold();
示例10: cacheMillis
import org.immutables.value.Value; //導入方法依賴的package包/類
/**
* How long to cache this expression's results
*/
@Value.Default
@Value.Auxiliary
public int cacheMillis() {
return 0;
}
示例11: isJacksonJsonTypeInfo
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public boolean isJacksonJsonTypeInfo() {
return environment().hasJacksonLib()
&& isJacksonJsonTypeInfoAnnotated(element());
}
示例12: isJsonQualifier
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public boolean isJsonQualifier() {
return environment().hasOkJsonLib()
&& OkQualifierMirror.isPresent(element());
}
示例13: isEnclosing
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Derived
@Value.Auxiliary
public boolean isEnclosing() {
return EnclosingMirror.isPresent(element());
}
示例14: timeoutMillis
import org.immutables.value.Value; //導入方法依賴的package包/類
/**
* @return the timeout after which the retrieval will be aborted
*/
@Value.Default
@Value.Auxiliary
public long timeoutMillis() {
return 7_500L;
}
示例15: simpleName
import org.immutables.value.Value; //導入方法依賴的package包/類
@Value.Auxiliary
@Value.Derived
public String simpleName() {
return element().getSimpleName().toString();
}