Ejemplo n.º 1
0
        //public Annotation GetAnnotation() {
        //   return label;
        //}
        /// This is the annotation associated with the point of contact.
        /// This will be an XML annotation that describes how the contact
        /// should be serialized and deserialized from the object.
        /// </summary>
        /// <param name="type">
        /// this is the type of the annotation to acquire
        /// </param>
        /// <returns>
        /// this provides the annotation associated with this
        /// </returns>
        public <T : Annotation> T getAnnotation(Class <T> type)
        {
            T result = get.getAnnotation(type);

            if (type == label.annotationType())
            {
                return((T)label);
            }
            if (result == null && set != null)
            {
                return(set.getAnnotation(type));
            }
            return(result);
        }