private Annotation[] extract(Annotation label) throws Exception {
  Class union=label.annotationType();
  Method[] list=union.getDeclaredMethods();
  if (list.length != 1) {
    throw new UnionException("Annotation '%s' is not a valid union for %s",label,type);
  }
  Method method=list[0];
  Object value=method.invoke(label);
  return (Annotation[])value;
}

private Annotation [ ] extract ( Annotation label ) throws Exception { Class union = label . annotationType ( ) ; Method [ ] list = union . getDeclaredMethods ( ) ; if ( list . length != 1 ) { throw new UnionException ( "Annotation '%s' is not a valid union for %s" , label , type ) ; } Method method = list [ 0 ] ; Object value = method . invoke ( label ) ; return ( Annotation [ ] ) value ; }
this is used to extract the individual annotations associated with the union annotation provided . if the annotation does not represent a union then this will return null .
