//# 0 errors, 38 messages
//#
/*
    //#commentevent.java:1:1: class: net.sourceforge.pebble.api.event.comment.CommentEvent
    //#commentevent.java:1:1: method: net.sourceforge.pebble.api.event.comment.CommentEvent.net.sourceforge.pebble.api.event.comment.CommentEvent__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.api.event.comment;

import net.sourceforge.pebble.domain.Comment;
import net.sourceforge.pebble.api.event.PebbleEvent;

/**
 * Event to signify that a comment has been added/removed.
 *
 * @author Simon Brown
 */
public class CommentEvent extends PebbleEvent {

  /** constant representing comment added type */
  public static final int COMMENT_ADDED = 0;

  /** constant representing comment removed type */
  public static final int COMMENT_REMOVED = 1;

  /** constant representing comment approved type */
  public static final int COMMENT_APPROVED = 2;

  /** constant representing comment rejected type */
  public static final int COMMENT_REJECTED = 3;

  /**
   * Creates a new instance with the specified source and type.
   *
   * @param comment   the comment that initiated this event
   * @param type        the type of this event
   */
  public CommentEvent(Comment comment, int type) {
    super(comment, type);
    //#commentevent.java:63: method: void net.sourceforge.pebble.api.event.comment.CommentEvent.net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)
    //#input(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): comment
    //#input(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): this
    //#input(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): type
    //#output(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): this.type
    //#output(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): this.vetoed
    //#post(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): this.type == type
    //#post(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): init'ed(this.type)
    //#post(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): this.vetoed == 0
    //#unanalyzed(void net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)): Effects-of-calling:java.util.EventObject
  }
    //#commentevent.java:64: end of method: void net.sourceforge.pebble.api.event.comment.CommentEvent.net.sourceforge.pebble.api.event.comment.CommentEvent(Comment, int)

  /**
   * Gets the Comment that is the source of this event.
   *
   * @return  a Comment instance
   */
  public Comment getComment() {
    return (Comment)getSource();
    //#commentevent.java:72: method: Comment net.sourceforge.pebble.api.event.comment.CommentEvent.getComment()
    //#commentevent.java:72: Warning: method not available
    //#    -- call on Object net.sourceforge.pebble.api.event.comment.CommentEvent:getSource()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.api.event.comment.CommentEvent
    //#    method: Comment getComment()
    //#    unanalyzed callee: Object net.sourceforge.pebble.api.event.comment.CommentEvent:getSource()
    //#input(Comment getComment()): net/sourceforge/pebble/domain/Comment.__Descendant_Table[net/sourceforge/pebble/domain/Comment]
    //#input(Comment getComment()): net/sourceforge/pebble/domain/Comment.__Descendant_Table[others]
    //#input(Comment getComment()): this
    //#output(Comment getComment()): return_value
    //#presumption(Comment getComment()): net.sourceforge.pebble.api.event.comment.CommentEvent:getSource(...).__Tag@72 == net/sourceforge/pebble/domain/Comment
    //#post(Comment getComment()): init'ed(return_value)
    //#commentevent.java:72: end of method: Comment net.sourceforge.pebble.api.event.comment.CommentEvent.getComment()
  }

}
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Descendant_Table[net/sourceforge/pebble/api/event/comment/CommentEvent]
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.getComment()Lnet/sourceforge/pebble/domain/Comment;
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.getType()I
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.isVetoed()Z
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.veto()V
    //#output(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): net/sourceforge/pebble/api/event/PebbleEvent.__Descendant_Table[net/sourceforge/pebble/api/event/comment/CommentEvent]
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Descendant_Table[net/sourceforge/pebble/api/event/comment/CommentEvent] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): net/sourceforge/pebble/api/event/PebbleEvent.__Descendant_Table[net/sourceforge/pebble/api/event/comment/CommentEvent] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.getComment()Lnet/sourceforge/pebble/domain/Comment; == &getComment
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.getType()I == &net/sourceforge/pebble/api/event/PebbleEvent.getType
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.isVetoed()Z == &net/sourceforge/pebble/api/event/PebbleEvent.isVetoed
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &net/sourceforge/pebble/api/event/PebbleEvent.toString
    //#post(net.sourceforge.pebble.api.event.comment.CommentEvent__static_init): __Dispatch_Table.veto()V == &net/sourceforge/pebble/api/event/PebbleEvent.veto
    //#commentevent.java:: end of method: net.sourceforge.pebble.api.event.comment.CommentEvent.net.sourceforge.pebble.api.event.comment.CommentEvent__static_init
    //#commentevent.java:: end of class: net.sourceforge.pebble.api.event.comment.CommentEvent
