package javax.enterprise.util;
Supports inline instantiation of annotation type instances.
An instance of an annotation type may be obtained by subclassing
AnnotationLiteral.
public abstract class PayByQualifier
extends AnnotationLiteral<PayBy>
implements PayBy {}
PayBy paybyCheque = new PayByQualifier() { public PaymentMethod value() { return CHEQUE; } };
return (Class<T>) parameterizedType
if (annotationLiteralSubclass == null)
if (value instanceof boolean[])
else if (value instanceof byte[])
else if (value instanceof short[])
else if (value instanceof int[])
else if (value instanceof long[])
else if (value instanceof float[])
else if (value instanceof double[])
else if (value instanceof char[])
else if (value instanceof String[])
for(int j=0; j<strings.length; j++)
quoted[j] = "\"" + strings[j] + "\"";
else if (value instanceof Class<?>[])
for(int j=0; j<classes.length; j++)
names[j] = classes[j].getName() + ".class";
else if (value instanceof Object[])
else if (value instanceof String)
else if (value instanceof Class<?>)
if (thisValue instanceof byte[] && thatValue instanceof byte[])
if ( !Arrays.equals((byte[])thisValue, (byte[])thatValue) ) return false;
else if (thisValue instanceof short[] && thatValue instanceof short[])
if ( !Arrays.equals((short[])thisValue, (short[])thatValue) ) return false;
else if (thisValue instanceof int[] && thatValue instanceof int[])
if ( !Arrays.equals((int[])thisValue, (int[])thatValue) ) return false;
else if (thisValue instanceof long[] && thatValue instanceof long[])
if ( !Arrays.equals((long[])thisValue, (long[])thatValue) ) return false;
else if (thisValue instanceof float[] && thatValue instanceof float[])
if ( !Arrays.equals((float[])thisValue, (float[])thatValue) ) return false;
else if (thisValue instanceof double[] && thatValue instanceof double[])
if ( !Arrays.equals((double[])thisValue, (double[])thatValue) ) return false;
else if (thisValue instanceof char[] && thatValue instanceof char[])
if ( !Arrays.equals((char[])thisValue, (char[])thatValue) ) return false;
else if (thisValue instanceof boolean[] && thatValue instanceof boolean[])
if ( !Arrays.equals((boolean[])thisValue, (boolean[])thatValue) ) return false;
else if (thisValue instanceof Object[] && thatValue instanceof Object[])
if (!thisValue.equals(thatValue)) return false;
if (value instanceof boolean[])
memberValueHashCode = Arrays.hashCode((boolean[]) value);
else if (value instanceof short[])
memberValueHashCode = Arrays.hashCode((short[]) value);
else if (value instanceof int[])
memberValueHashCode = Arrays.hashCode((int[]) value);
else if (value instanceof long[])
memberValueHashCode = Arrays.hashCode((long[]) value);
else if (value instanceof float[])
memberValueHashCode = Arrays.hashCode((float[]) value);
else if (value instanceof double[])
memberValueHashCode = Arrays.hashCode((double[]) value);
else if (value instanceof byte[])
memberValueHashCode = Arrays.hashCode((byte[]) value);
else if (value instanceof char[])
memberValueHashCode = Arrays.hashCode((char[]) value);
else if (value instanceof Object[])
hashCode += memberNameHashCode ^ memberValueHashCode;
return method.invoke(instance);