File Source: CoreActionComponent.java

         /* 
    P/P   *  Method: com.dmdirc.actions.CoreActionComponent$25__static_init
          */
     1  /*
     2   * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
     3   *
     4   * Permission is hereby granted, free of charge, to any person obtaining a copy
     5   * of this software and associated documentation files (the "Software"), to deal
     6   * in the Software without restriction, including without limitation the rights
     7   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     8   * copies of the Software, and to permit persons to whom the Software is
     9   * furnished to do so, subject to the following conditions:
    10   *
    11   * The above copyright notice and this permission notice shall be included in
    12   * all copies or substantial portions of the Software.
    13   *
    14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    20   * SOFTWARE.
    21   */
    22  
    23  package com.dmdirc.actions;
    24  
    25  import com.dmdirc.actions.interfaces.ActionComponent;
    26  import com.dmdirc.Channel;
    27  import com.dmdirc.FrameContainer;
    28  import com.dmdirc.Query;
    29  import com.dmdirc.Server;
    30  import com.dmdirc.logger.ErrorLevel;
    31  import com.dmdirc.logger.Logger;
    32  import com.dmdirc.parser.irc.ChannelClientInfo;
    33  import com.dmdirc.parser.irc.ClientInfo;
    34  import com.dmdirc.ui.messages.Styliser;
    35  
    36  import java.awt.Color;
    37  import java.awt.event.KeyEvent;
    38  import java.util.Calendar;
    39  import java.util.GregorianCalendar;
    40  
    41  import javax.swing.KeyStroke;
    42  
    43  /**
    44   * A CoreActionComponent represents a component of some object that the user can
    45   * use as the subject of a condition within an action.
    46   * @author chris
    47   */
         /* 
    P/P   *  Method: void com.dmdirc.actions.CoreActionComponent(String, int, CoreActionComponent$1)
          */
    48  public enum CoreActionComponent implements ActionComponent {
    49      
    50      /** Returns the name of the server. */
             /* 
    P/P       *  Method: com.dmdirc.actions.CoreActionComponent__static_init
              * 
              *  Postconditions:
              *    $VALUES == &new CoreActionComponent[](CoreActionComponent__static_init#28)
              *    CALENDAR_FULLSTRING == &new CoreActionComponent$18(CoreActionComponent__static_init#18)
              *    CHANNEL_COLOUR == &new CoreActionComponent$7(CoreActionComponent__static_init#7)
              *    CHANNEL_NAME == &new CoreActionComponent$6(CoreActionComponent__static_init#6)
              *    CLIENT_HOST == &new CoreActionComponent$9(CoreActionComponent__static_init#9)
              *    CLIENT_NAME == &new CoreActionComponent$8(CoreActionComponent__static_init#8)
              *    KEYEVENT_ALTSTATE == &new CoreActionComponent$22(CoreActionComponent__static_init#22)
              *    KEYEVENT_CTRLSTATE == &new CoreActionComponent$20(CoreActionComponent__static_init#20)
              *    KEYEVENT_KEYNAME == &new CoreActionComponent$19(CoreActionComponent__static_init#19)
              *    KEYEVENT_SHIFTSTATE == &new CoreActionComponent$21(CoreActionComponent__static_init#21)
              *    ...
              */
    51      SERVER_NAME {
    52          /** {@inheritDoc} */
    53          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    argument.serverInfo != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    54          public Object get(final Object argument) { return ((Server) argument).getName(); }
    55          /** {@inheritDoc} */
    56          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
    57          public Class appliesTo() { return Server.class; }
    58          /** {@inheritDoc} */
    59          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
    60          public Class getType() { return String.class; }
    61          /** {@inheritDoc} */
    62          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"name"
                  */
    63          public String getName() { return "name"; }
    64      },
    65      
    66      /** Returns the network of the server. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$2(String, int)
              */
    67      SERVER_NETWORK {
    68          /** {@inheritDoc} */
    69          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    argument.parser != null
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuilder:toString(...)._tainted == 0
                  *    init'ed(return_value)
                  */
    70          public Object get(final Object argument) { return ((Server) argument).getNetwork(); }
    71          /** {@inheritDoc} */
    72          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
    73          public Class appliesTo() { return Server.class; }
    74          /** {@inheritDoc} */
    75          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
    76          public Class getType() { return String.class; }
    77          /** {@inheritDoc} */
    78          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"network"
                  */
    79          public String getName() { return "network"; }
    80      },
    81      
    82      /** Returns the away reason for the server. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$3(String, int)
              */
    83      SERVER_MYAWAYREASON {
    84          /** {@inheritDoc} */
    85          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.awayMessage)
                  * 
                  *  Postconditions:
                  *    return_value == argument.awayMessage
                  *    init'ed(return_value)
                  */
    86          public Object get(final Object argument) { return ((Server) argument).getAwayMessage(); }
    87          /** {@inheritDoc} */
    88          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
    89          public Class appliesTo() { return Server.class; }
    90          /** {@inheritDoc} */
    91          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
    92          public Class getType() { return String.class; }
    93          /** {@inheritDoc} */
    94          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"away reason"
                  */
    95          public String getName() { return "away reason"; }
    96      },
    97      
    98      /** Returns the channel umodes for the server. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$4(String, int)
              */
    99      SERVER_CHANNELUMODES {
   100          /** {@inheritDoc} */
   101          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    argument.parser != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   102          public Object get(final Object argument) { return ((Server) argument).getParser().getPrefixModes(); }
   103          /** {@inheritDoc} */
   104          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   105          public Class appliesTo() { return Server.class; }
   106          /** {@inheritDoc} */
   107          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   108          public Class getType() { return String.class; }
   109          /** {@inheritDoc} */
   110          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"list of channel usermodes"
                  */
   111          public String getName() { return "list of channel usermodes"; }
   112      },    
   113      
   114      /** Returns the nickname for the server. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$5(String, int)
              */
   115      SERVER_MYNICKNAME {
   116          /** {@inheritDoc} */
   117          @Override
   118          public Object get(final Object argument) {
                     /* 
    P/P               *  Method: Object get(Object)
                      * 
                      *  Preconditions:
                      *    (soft) init'ed(argument.parser)
                      * 
                      *  Presumptions:
                      *    init'ed(com.dmdirc.logger.ErrorLevel.LOW)
                      *    com.dmdirc.parser.irc.IRCParser:getMyself(...)@130 != null
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      * 
                      *  Test Vectors:
                      *    argument: Addr_Set{null}, Inverse{null}
                      *    argument.parser: Inverse{null}, Addr_Set{null}
                      */
   119              final Server server = (Server) argument;
   120              
   121              if (server == null || server.getParser() == null) {
   122                  Logger.appError(ErrorLevel.LOW, "SERVER_MYNICKNAME.get() called with null element",
   123                          new UnsupportedOperationException(
   124                          server == null ? "Server was null" :
   125                              server.getParser() == null ? "Parser was null" : "Unknown"
   126                          ));
   127                  
   128                  return "null";
   129              } else {
   130                  return server.getParser().getMyself().getNickname();
   131              }
   132          }
   133          /** {@inheritDoc} */
   134          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   135          public Class appliesTo() { return Server.class; }
   136          /** {@inheritDoc} */
   137          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   138          public Class getType() { return String.class; }
   139          /** {@inheritDoc} */
   140          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"nickname"
                  */
   141          public String getName() { return "nickname"; }
   142      },
   143      
   144      /** Returns the name of the channel. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$6(String, int)
              */
   145      CHANNEL_NAME {
   146          /** {@inheritDoc} */
   147          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    argument.channelInfo != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   148          public Object get(final Object argument) { return ((Channel) argument).getChannelInfo().getName(); }
   149          /** {@inheritDoc} */
   150          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   151          public Class appliesTo() { return Channel.class; }
   152          /** {@inheritDoc} */
   153          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   154          public Class getType() { return String.class; }
   155          /** {@inheritDoc} */
   156          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"name"
                  */
   157          public String getName() { return "name"; }
   158      },
   159      
   160      /** Returns the notification colour of the channel. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$7(String, int)
              */
   161      CHANNEL_COLOUR {
   162          /** {@inheritDoc} */
   163          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.notification)
                  * 
                  *  Postconditions:
                  *    return_value == argument.notification
                  *    init'ed(return_value)
                  */
   164          public Object get(final Object argument) { return ((Channel) argument).getNotification(); }
   165          /** {@inheritDoc} */
   166          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   167          public Class appliesTo() { return Channel.class; }
   168          /** {@inheritDoc} */
   169          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   170          public Class getType() { return Color.class; }
   171          /** {@inheritDoc} */
   172          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"notification colour"
                  */
   173          public String getName() { return "notification colour"; }
   174      },
   175      
   176      /** Returns the name of a client. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$8(String, int)
              */
   177      CLIENT_NAME {
   178          /** {@inheritDoc} */
   179          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   180          public Object get(final Object argument) { return ((ClientInfo) argument).getNickname(); }
   181          /** {@inheritDoc} */
   182          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   183          public Class appliesTo() { return ClientInfo.class; }
   184          /** {@inheritDoc} */
   185          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   186          public Class getType() { return String.class; }
   187          /** {@inheritDoc} */
   188          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"nickname"
                  */
   189          public String getName() { return "nickname"; }
   190      },
   191      
   192      /** Returns the host of a client. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$9(String, int)
              */
   193      CLIENT_HOST {
   194          /** {@inheritDoc} */
   195          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   196          public Object get(final Object argument) { return ((ClientInfo) argument).getHost(); }
   197          /** {@inheritDoc} */
   198          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   199          public Class appliesTo() { return ClientInfo.class; }
   200          /** {@inheritDoc} */
   201          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   202          public Class getType() { return String.class; }
   203          /** {@inheritDoc} */
   204          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"host"
                  */
   205          public String getName() { return "host"; }
   206      },
   207      
   208      /** Returns the name of a client. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$10(String, int)
              */
   209      USER_NAME {
   210          /** {@inheritDoc} */
   211          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   212          public Object get(final Object argument) { return ((ChannelClientInfo) argument).getNickname(); }
   213          /** {@inheritDoc} */
   214          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   215          public Class appliesTo() { return ChannelClientInfo.class; }
   216          /** {@inheritDoc} */
   217          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   218          public Class getType() { return String.class; }
   219          /** {@inheritDoc} */
   220          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"nickname"
                  */
   221          public String getName() { return "nickname"; }
   222      },
   223      
   224      /** Returns the modes of a client. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$11(String, int)
              */
   225      USER_MODES {
   226          /** {@inheritDoc} */
   227          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   228          public Object get(final Object argument) { return ((ChannelClientInfo) argument).getChanModeStr(false); }
   229          /** {@inheritDoc} */
   230          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   231          public Class appliesTo() { return ChannelClientInfo.class; }
   232          /** {@inheritDoc} */
   233          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   234          public Class getType() { return String.class; }
   235          /** {@inheritDoc} */
   236          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"modes"
                  */
   237          public String getName() { return "modes"; }
   238      },
   239      
   240      /** Returns the host of a client. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$12(String, int)
              */
   241      USER_HOST {
   242          /** {@inheritDoc} */
   243          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Presumptions:
                  *    com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)@244 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   244          public Object get(final Object argument) { return ((ChannelClientInfo) argument).getClient().getHost(); }
   245          /** {@inheritDoc} */
   246          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   247          public Class appliesTo() { return ChannelClientInfo.class; }
   248          /** {@inheritDoc} */
   249          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   250          public Class getType() { return String.class; }
   251          /** {@inheritDoc} */
   252          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"host"
                  */
   253          public String getName() { return "host"; }
   254      },
   255      
   256      /** Returns the number of common channels the client is on. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$13(String, int)
              */
   257      USER_COMCHANS {
   258          /** {@inheritDoc} */
   259          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Presumptions:
                  *    com.dmdirc.parser.irc.ChannelClientInfo:getClient(...)@260 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   260          public Object get(final Object argument) { return Integer.valueOf(((ChannelClientInfo) argument).getClient().channelCount()); }
   261          /** {@inheritDoc} */
   262          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   263          public Class appliesTo() { return ChannelClientInfo.class; }
   264          /** {@inheritDoc} */
   265          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   266          public Class getType() { return Integer.class; }
   267          /** {@inheritDoc} */
   268          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"number of common channels"
                  */
   269          public String getName() { return "number of common channels"; }
   270      },
   271      
   272      /** Returns the content of a string. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$14(String, int)
              */
   273      STRING_STRING {
   274          /** {@inheritDoc} */
   275          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Postconditions:
                  *    return_value == argument
                  *    init'ed(return_value)
                  */
   276          public Object get(final Object argument) { return argument; }
   277          /** {@inheritDoc} */
   278          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   279          public Class appliesTo() { return String.class; }
   280          /** {@inheritDoc} */
   281          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   282          public Class getType() { return String.class; }
   283          /** {@inheritDoc} */
   284          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"content"
                  */
   285          public String getName() { return "content"; }
   286      },
   287      
   288      /** Returns the content of a string, stripped of formatting. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$15(String, int)
              */
   289      STRING_STRIPPED {
   290          /** {@inheritDoc} */
   291          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   292          public Object get(final Object argument) { return Styliser.stipControlCodes((String) argument); }
   293          /** {@inheritDoc} */
   294          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   295          public Class appliesTo() { return String.class; }
   296          /** {@inheritDoc} */
   297          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   298          public Class getType() { return String.class; }
   299          /** {@inheritDoc} */
   300          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"content (without formatting)"
                  */
   301          public String getName() { return "content (without formatting)"; }
   302      },    
   303      
   304      /** Returns the length of a string. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$16(String, int)
              */
   305      STRING_LENGTH {
   306          /** {@inheritDoc} */
   307          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   308          public Object get(final Object argument) { return ((String) argument).length(); }
   309          /** {@inheritDoc} */
   310          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   311          public Class appliesTo() { return String.class; }
   312          /** {@inheritDoc} */
   313          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   314          public Class getType() { return Integer.class; }
   315          /** {@inheritDoc} */
   316          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &"length"
                  */
   317          public String getName() { return "length"; }
   318      },
   319      
   320      /** Returns the size of a string array. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$17(String, int)
              */
   321      STRINGARRAY_LENGTH {
   322          /** {@inheritDoc} */
   323          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    argument.length <= 232-1
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   324          public Object get(final Object argument) { return Integer.valueOf(((String[]) argument).length); }
   325          /** {@inheritDoc} */
   326          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   327          public Class appliesTo() { return String[].class; }
   328          /** {@inheritDoc} */
   329          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   330          public Class getType() { return Integer.class; }
   331          /** {@inheritDoc} */
   332          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"size"
                  */
   333          public String getName() { return "size"; }
   334      },
   335      
   336      /** Returns the readable representation of a date. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$18(String, int)
              */
   337      CALENDAR_FULLSTRING {
   338          /** {@inheritDoc} */
   339          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Presumptions:
                  *    java.util.GregorianCalendar:getTime(...)@340 != null
                  * 
                  *  Postconditions:
                  *    java.util.Date:toString(...)._tainted == 0
                  *    return_value == &amp;java.util.Date:toString(...)
                  */
   340          public Object get(final Object argument) { return ((GregorianCalendar) argument).getTime().toString(); }
   341          /** {@inheritDoc} */
   342          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   343          public Class appliesTo() { return Calendar.class; }
   344          /** {@inheritDoc} */
   345          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   346          public Class getType() { return String.class; }
   347          /** {@inheritDoc} */
   348          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"full date"
                  */
   349          public String getName() { return "full date"; }
   350      },
   351      
   352      /** Returns the name of the key that was pressed. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$19(String, int)
              */
   353      KEYEVENT_KEYNAME {
   354          /** {@inheritDoc} */
   355          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   356          public Object get(final Object argument) { return KeyEvent.getKeyText(((KeyStroke) argument).getKeyCode()); }
   357          /** {@inheritDoc} */
   358          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   359          public Class appliesTo() { return KeyStroke.class; }
   360          /** {@inheritDoc} */
   361          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   362          public Class getType() { return String.class; }
   363          /** {@inheritDoc} */
   364          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"key name"
                  */
   365          public String getName() { return "key name"; }
   366      },
   367      
   368      /** Returns the state of the control key for a key press event. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$20(String, int)
              */
   369      KEYEVENT_CTRLSTATE {
   370          /** {@inheritDoc} */
   371          @Override
   372          public Object get(final Object argument) {
                     /* 
    P/P               *  Method: Object get(Object)
                      * 
                      *  Preconditions:
                      *    argument != null
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   373              return Boolean.valueOf((((KeyStroke) argument).getModifiers() & KeyEvent.CTRL_DOWN_MASK) != 0);
   374          }
   375          /** {@inheritDoc} */
   376          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   377          public Class appliesTo() { return KeyStroke.class; }
   378          /** {@inheritDoc} */
   379          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   380          public Class getType() { return Boolean.class; }
   381          /** {@inheritDoc} */
   382          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"control key state"
                  */
   383          public String getName() { return "control key state"; }
   384      },
   385      
   386      /** Returns the state of the shift key for a key press event. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$21(String, int)
              */
   387      KEYEVENT_SHIFTSTATE {
   388          /** {@inheritDoc} */
   389          @Override
   390          public Object get(final Object argument) {
                     /* 
    P/P               *  Method: Object get(Object)
                      * 
                      *  Preconditions:
                      *    argument != null
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   391              return Boolean.valueOf((((KeyStroke) argument).getModifiers() & KeyEvent.SHIFT_DOWN_MASK) != 0);
   392          }
   393          /** {@inheritDoc} */
   394          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   395          public Class appliesTo() { return KeyStroke.class; }
   396          /** {@inheritDoc} */
   397          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   398          public Class getType() { return Boolean.class; }
   399          /** {@inheritDoc} */
   400          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"shift key state"
                  */
   401          public String getName() { return "shift key state"; }
   402      },
   403      
   404      /** Returns the state of the shift key for a key press event. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$22(String, int)
              */
   405      KEYEVENT_ALTSTATE {
   406          /** {@inheritDoc} */
   407          @Override
   408          public Object get(final Object argument) {
                     /* 
    P/P               *  Method: Object get(Object)
                      * 
                      *  Preconditions:
                      *    argument != null
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   409              return Boolean.valueOf((((KeyStroke) argument).getModifiers() & KeyEvent.ALT_DOWN_MASK) != 0);
   410          }
   411          /** {@inheritDoc} */
   412          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   413          public Class appliesTo() { return KeyStroke.class; }
   414          /** {@inheritDoc} */
   415          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   416          public Class getType() { return Boolean.class; }
   417          /** {@inheritDoc} */
   418          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"alt key state"
                  */
   419          public String getName() { return "alt key state"; }
   420      },
   421      
   422      /** Returns the host of the query. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$23(String, int)
              */
   423      QUERY_HOST {
   424          /** {@inheritDoc} */
   425          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.host)
                  * 
                  *  Postconditions:
                  *    return_value == argument.host
                  *    init'ed(return_value)
                  */
   426          public Object get(final Object argument) { return ((Query) argument).getHost(); }
   427          /** {@inheritDoc} */
   428          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   429          public Class appliesTo() { return Query.class; }
   430          /** {@inheritDoc} */
   431          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   432          public Class getType() { return String.class; }
   433          /** {@inheritDoc} */
   434          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"host"
                  */
   435          public String getName() { return "host"; }
   436      },
   437      
   438      /** Returns the host of the query. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$24(String, int)
              */
   439      QUERY_NICK {
   440          /** {@inheritDoc} */
   441          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.host)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   442          public Object get(final Object argument) { return ((Query) argument).toString(); }
   443          /** {@inheritDoc} */
   444          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   445          public Class appliesTo() { return Query.class; }
   446          /** {@inheritDoc} */
   447          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   448          public Class getType() { return String.class; }
   449          /** {@inheritDoc} */
   450          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"nick"
                  */
   451          public String getName() { return "nick"; }
   452      },
   453      
   454      /** Returns the notification colour of the query. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$25(String, int)
              */
   455      QUERY_COLOUR {
   456          /** {@inheritDoc} */
   457          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.notification)
                  * 
                  *  Postconditions:
                  *    return_value == argument.notification
                  *    init'ed(return_value)
                  */
   458          public Object get(final Object argument) { return ((Query) argument).getNotification(); }
   459          /** {@inheritDoc} */
   460          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   461          public Class appliesTo() { return Query.class; }
   462          /** {@inheritDoc} */
   463          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   464          public Class getType() { return Color.class; }
   465          /** {@inheritDoc} */
   466          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"notification colour"
                  */
   467          public String getName() { return "notification colour"; }
   468      },
   469  
   470      /** The name of a window. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$26(String, int)
              */
   471      WINDOW_NAME {
   472          /** {@inheritDoc} */
   473          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   474          public Object get(final Object argument) { return ((FrameContainer) argument).toString(); }
   475          /** {@inheritDoc} */
   476          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   477          public Class appliesTo() { return FrameContainer.class; }
   478          /** {@inheritDoc} */
   479          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   480          public Class getType() { return String.class; }
   481          /** {@inheritDoc} */
   482          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"name"
                  */
   483          public String getName() { return "name"; }
   484      },
   485      
   486      /** Returns the notification colour of the window. */
             /* 
    P/P       *  Method: void com.dmdirc.actions.CoreActionComponent$27(String, int)
              */
   487      WINDOW_COLOUR {
   488          /** {@inheritDoc} */
   489          @Override
                 /* 
    P/P           *  Method: Object get(Object)
                  * 
                  *  Preconditions:
                  *    argument != null
                  *    init'ed(argument.notification)
                  * 
                  *  Postconditions:
                  *    return_value == argument.notification
                  *    init'ed(return_value)
                  */
   490          public Object get(final Object argument) { return ((FrameContainer) argument).getNotification(); }
   491          /** {@inheritDoc} */
   492          @Override
                 /* 
    P/P           *  Method: Class appliesTo()
                  */
   493          public Class appliesTo() { return FrameContainer.class; }
   494          /** {@inheritDoc} */
   495          @Override
                 /* 
    P/P           *  Method: Class getType()
                  */
   496          public Class getType() { return Color.class; }
   497          /** {@inheritDoc} */
   498          @Override
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Postconditions:
                  *    return_value == &amp;"notification colour"
                  */
   499          public String getName() { return "notification colour"; }
   500      };
   501          
   502  }








SofCheck Inspector Build Version : 2.17854
CoreActionComponent.java 2009-Jun-25 01:54:24
CoreActionComponent.class 2009-Sep-02 17:04:13
CoreActionComponent$1.class 2009-Sep-02 17:04:13
CoreActionComponent$10.class 2009-Sep-02 17:04:13
CoreActionComponent$11.class 2009-Sep-02 17:04:13
CoreActionComponent$12.class 2009-Sep-02 17:04:13
CoreActionComponent$13.class 2009-Sep-02 17:04:13
CoreActionComponent$14.class 2009-Sep-02 17:04:13
CoreActionComponent$15.class 2009-Sep-02 17:04:13
CoreActionComponent$16.class 2009-Sep-02 17:04:13
CoreActionComponent$17.class 2009-Sep-02 17:04:13
CoreActionComponent$18.class 2009-Sep-02 17:04:13
CoreActionComponent$19.class 2009-Sep-02 17:04:13
CoreActionComponent$2.class 2009-Sep-02 17:04:13
CoreActionComponent$20.class 2009-Sep-02 17:04:13
CoreActionComponent$21.class 2009-Sep-02 17:04:13
CoreActionComponent$22.class 2009-Sep-02 17:04:13
CoreActionComponent$23.class 2009-Sep-02 17:04:13
CoreActionComponent$24.class 2009-Sep-02 17:04:13
CoreActionComponent$25.class 2009-Sep-02 17:04:13
CoreActionComponent$26.class 2009-Sep-02 17:04:13
CoreActionComponent$27.class 2009-Sep-02 17:04:13
CoreActionComponent$3.class 2009-Sep-02 17:04:13
CoreActionComponent$4.class 2009-Sep-02 17:04:13
CoreActionComponent$5.class 2009-Sep-02 17:04:13
CoreActionComponent$6.class 2009-Sep-02 17:04:13
CoreActionComponent$7.class 2009-Sep-02 17:04:13
CoreActionComponent$8.class 2009-Sep-02 17:04:13
CoreActionComponent$9.class 2009-Sep-02 17:04:13