本文整理了Java中org.elasticsearch.common.inject.Key.computeHashCode()
方法的一些代码示例,展示了Key.computeHashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Key.computeHashCode()
方法的具体详情如下:
包路径:org.elasticsearch.common.inject.Key
类名称:Key
方法名:computeHashCode
暂无
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Constructs a key from a manually specified type.
*/
private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe(typeLiteral);
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo}:
* <p>
* {@code new Key<Foo>() {}}.
*/
@SuppressWarnings("unchecked")
protected Key() {
this.annotationStrategy = NullAnnotationStrategy.INSTANCE;
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Unsafe. Constructs a key from a manually specified type.
*/
@SuppressWarnings("unchecked")
private Key(Type type, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe((TypeLiteral<T>) TypeLiteral.get(type));
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(new Bar()) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Annotation annotation) {
// no usages, not test-covered
this.annotationStrategy = strategyFor(annotation);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(Bar.class) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Class<? extends Annotation> annotationType) {
this.annotationStrategy = strategyFor(annotationType);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Constructs a key from a manually specified type.
*/
private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe(typeLiteral);
this.hashCode = computeHashCode();
}
代码示例来源:origin: harbby/presto-connectors
/**
* Constructs a key from a manually specified type.
*/
private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe(typeLiteral);
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Constructs a key from a manually specified type.
*/
private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe(typeLiteral);
this.hashCode = computeHashCode();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Constructs a key from a manually specified type.
*/
private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe(typeLiteral);
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo}:
* <p>
* {@code new Key<Foo>() {}}.
*/
@SuppressWarnings("unchecked")
protected Key() {
this.annotationStrategy = NullAnnotationStrategy.INSTANCE;
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo}:
* <p>
* {@code new Key<Foo>() {}}.
*/
@SuppressWarnings("unchecked")
protected Key() {
this.annotationStrategy = NullAnnotationStrategy.INSTANCE;
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: harbby/presto-connectors
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo}:
* <p>
* {@code new Key<Foo>() {}}.
*/
@SuppressWarnings("unchecked")
protected Key() {
this.annotationStrategy = NullAnnotationStrategy.INSTANCE;
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Unsafe. Constructs a key from a manually specified type.
*/
@SuppressWarnings("unchecked")
private Key(Type type, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe((TypeLiteral<T>) TypeLiteral.get(type));
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Unsafe. Constructs a key from a manually specified type.
*/
@SuppressWarnings("unchecked")
private Key(Type type, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe((TypeLiteral<T>) TypeLiteral.get(type));
this.hashCode = computeHashCode();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(Bar.class) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Class<? extends Annotation> annotationType) {
this.annotationStrategy = strategyFor(annotationType);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Unsafe. Constructs a key from a manually specified type.
*/
@SuppressWarnings("unchecked")
private Key(Type type, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe((TypeLiteral<T>) TypeLiteral.get(type));
this.hashCode = computeHashCode();
}
代码示例来源:origin: harbby/presto-connectors
/**
* Unsafe. Constructs a key from a manually specified type.
*/
@SuppressWarnings("unchecked")
private Key(Type type, AnnotationStrategy annotationStrategy) {
this.annotationStrategy = annotationStrategy;
this.typeLiteral = MoreTypes.makeKeySafe((TypeLiteral<T>) TypeLiteral.get(type));
this.hashCode = computeHashCode();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(Bar.class) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Class<? extends Annotation> annotationType) {
this.annotationStrategy = strategyFor(annotationType);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(Bar.class) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Class<? extends Annotation> annotationType) {
this.annotationStrategy = strategyFor(annotationType);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Constructs a new key. Derives the type from this class's type parameter.
* <p>
* Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
* <p>
* Example usage for a binding of type {@code Foo} annotated with
* {@code @Bar}:
* <p>
* {@code new Key<Foo>(new Bar()) {}}.
*/
@SuppressWarnings("unchecked")
protected Key(Annotation annotation) {
// no usages, not test-covered
this.annotationStrategy = strategyFor(annotation);
this.typeLiteral = (TypeLiteral<T>) TypeLiteral.fromSuperclassTypeParameter(getClass());
this.hashCode = computeHashCode();
}
内容来源于网络,如有侵权,请联系作者删除!