in geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/util/AnnotationLiteral.java [241:309]
public int hashCode()
{
if (_hashCode != null) {
return _hashCode.intValue();
}
Method[] methods = getMethods();
int hashCode = 0;
for (Method method : methods)
{
// Member name
int name = 127 * method.getName().hashCode();
// Member value
Object object = callMethod(this, method);
int value = 0;
if(object.getClass().isArray())
{
Class<?> type = object.getClass().getComponentType();
if(type.isPrimitive())
{
if(Long.TYPE == type)
{
value = Arrays.hashCode((Long[])object);
}
else if(Integer.TYPE == type)
{
value = Arrays.hashCode((Integer[])object);
}
else if(Short.TYPE == type)
{
value = Arrays.hashCode((Short[])object);
}
else if(Double.TYPE == type)
{
value = Arrays.hashCode((Double[])object);
}
else if(Float.TYPE == type)
{
value = Arrays.hashCode((Float[])object);
}
else if(Boolean.TYPE == type)
{
value = Arrays.hashCode((Long[])object);
}
else if(Byte.TYPE == type)
{
value = Arrays.hashCode((Byte[])object);
}
else if(Character.TYPE == type)
{
value = Arrays.hashCode((Character[])object);
}
}
else
{
value = Arrays.hashCode((Object[])object);
}
}
else
{
value = object.hashCode();
}
hashCode += name ^ value;
}
_hashCode = Integer.valueOf(hashCode);
return hashCode;
}