本文整理了Java中java.lang.annotation.Annotation.hashCode()
方法的一些代码示例,展示了Annotation.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.hashCode()
方法的具体详情如下:
包路径:java.lang.annotation.Annotation
类名称:Annotation
方法名:hashCode
[英]Returns the hash code of this annotation. The hash code is determined according to the following rules:
代码示例来源:origin: spring-projects/spring-framework
@Override
public int hashCode() {
return (this.fieldType.hashCode() * 29 + this.annotation.hashCode());
}
}
代码示例来源:origin: redisson/redisson
@Override
public int hashCode() {
return annotation.hashCode();
}
代码示例来源:origin: jersey/jersey
@Override
public int hashCode() {
return annotation != null ? annotation.hashCode() : 0;
}
代码示例来源:origin: com.google.inject/guice
@Override
public int hashCode() {
return 37 * annotation.hashCode();
}
代码示例来源:origin: jersey/jersey
@Override
public int hashCode() {
return annotation != null ? annotation.hashCode() : 0;
}
代码示例来源:origin: com.google.inject/guice
@Override
public int hashCode() {
return annotation.hashCode();
}
代码示例来源:origin: org.springframework/spring-context
@Override
public int hashCode() {
return (this.fieldType.hashCode() * 29 + this.annotation.hashCode());
}
}
代码示例来源:origin: jersey/jersey
@Override
public int hashCode() {
int result = annotations != null ? Arrays.hashCode(annotations) : 0;
result = 31 * result + (sourceAnnotation != null ? sourceAnnotation.hashCode() : 0);
result = 31 * result + (source != null ? source.hashCode() : 0);
result = 31 * result + (sourceName != null ? sourceName.hashCode() : 0);
result = 31 * result + (encoded ? 1 : 0);
result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
result = 31 * result + (rawType != null ? rawType.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
return result;
}
}
代码示例来源:origin: jersey/jersey
@Override
public int hashCode() {
int result = annotations != null ? Arrays.hashCode(annotations) : 0;
result = 31 * result + (sourceAnnotation != null ? sourceAnnotation.hashCode() : 0);
result = 31 * result + (source != null ? source.hashCode() : 0);
result = 31 * result + (sourceName != null ? sourceName.hashCode() : 0);
result = 31 * result + (encoded ? 1 : 0);
result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
result = 31 * result + (rawType != null ? rawType.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
return result;
}
}
代码示例来源:origin: org.glassfish.jersey.media/jersey-media-json-jackson
private final static int calcHash(Annotation[] annotations)
{
/* hmmh. Can't just base on Annotation type; chances are that Annotation
* instances use identity hash, which has to do.
*/
final int len = annotations.length;
int hash = len;
for (int i = 0; i < len; ++i) {
hash = (hash * 31) + annotations[i].hashCode();
}
return hash;
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public int hashCode() {
return 37 * annotation.hashCode();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public int hashCode() {
return annotation.hashCode();
}
代码示例来源:origin: org.glassfish.jersey.core/jersey-server
@Override
public int hashCode() {
return annotation != null ? annotation.hashCode() : 0;
}
代码示例来源:origin: org.glassfish.jersey.core/jersey-server
@Override
public int hashCode() {
int result = annotations != null ? Arrays.hashCode(annotations) : 0;
result = 31 * result + (sourceAnnotation != null ? sourceAnnotation.hashCode() : 0);
result = 31 * result + (source != null ? source.hashCode() : 0);
result = 31 * result + (sourceName != null ? sourceName.hashCode() : 0);
result = 31 * result + (encoded ? 1 : 0);
result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
result = 31 * result + (rawType != null ? rawType.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
return result;
}
}
代码示例来源:origin: com.fasterxml.jackson.jaxrs/jackson-jaxrs-base
private final static int calcHash(Annotation[] annotations)
{
/* hmmh. Can't just base on Annotation type; chances are that Annotation
* instances use identity hash, which has to do.
*/
final int len = annotations.length;
int hash = len;
for (int i = 0; i < len; ++i) {
hash = (hash * 31) + annotations[i].hashCode();
}
return hash;
}
代码示例来源:origin: org.codehaus.griffon/griffon-core
@Override
public int hashCode() {
int result = qualifier != null ? qualifier.hashCode() : 0;
result = 31 * result + instance.hashCode();
return result;
}
代码示例来源:origin: skadistats/clarity
@Override
public int hashCode() {
int result = annotation.hashCode();
result = 31 * result + processorClass.hashCode();
result = 31 * result + (method != null ? method.hashCode() : 0);
return result;
}
代码示例来源:origin: org.codehaus.griffon/griffon-core
@Override
public int hashCode() {
int result = source.hashCode();
if (annotation != null) {
result = 31 * result + annotation.hashCode();
} else {
result = 31 * result + (annotationType != null ? annotationType.hashCode() : 0);
}
return result;
}
代码示例来源:origin: org.mule/mule-core
@Override
public int hashCode()
{
int result = type != null ? type.hashCode() : 0;
result = 31 * result + (member != null ? member.hashCode() : 0);
result = 31 * result + (clazz != null ? clazz.hashCode() : 0);
result = 31 * result + (annotation != null ? annotation.hashCode() : 0);
return result;
}
}
代码示例来源:origin: org.mule.runtime/mule-core
@Override
public int hashCode() {
int result = type != null ? type.hashCode() : 0;
result = 31 * result + (member != null ? member.hashCode() : 0);
result = 31 * result + (clazz != null ? clazz.hashCode() : 0);
result = 31 * result + (annotation != null ? annotation.hashCode() : 0);
return result;
}
}
内容来源于网络,如有侵权,请联系作者删除!