Changeset 3418


Ignore:
Timestamp:
Feb 20, 2008, 7:44:03 PM (13 years ago)
Author:
yura
Message:
  • Suppress warnings.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/builder/RfpBuilder.java

    r3389 r3418  
    263263     *      org.eclipse.core.runtime.IProgressMonitor)
    264264     */
     265    @SuppressWarnings("unchecked")
    265266    @Override
    266     @SuppressWarnings("unchecked")
    267267    protected IProject[] build (int kind, Map args, IProgressMonitor monitor) throws CoreException {
    268268        if (kind == FULL_BUILD)
  • to-imperative/trunk/java/runtime/org/refal/plus/Symbol.java

    r3404 r3418  
    1818
    1919    public static final Comparable null_object = new Reference(null);
    20 
    21     public static Comparable valueOf (boolean b) {
    22         return String.valueOf(b);
    23     }
    24 
    25     public static Comparable valueOf (char c) {
    26         return Character.valueOf(c);
    27     }
    28 
    29     public static Comparable valueOf (byte b) {
    30         return BigInteger.valueOf(b);
    31     }
    32 
    33     public static Comparable valueOf (int i) {
    34         return BigInteger.valueOf(i);
    35     }
    36 
    37     public static Comparable valueOf (long l) {
    38         return BigInteger.valueOf(l);
    39     }
    40 
    41     public static Comparable valueOf (short s) {
    42         return BigInteger.valueOf(s);
    43     }
    44 
    45     public static boolean booleanValue (Comparable c) {
    46         return Boolean.parseBoolean((String) c);
    47     }
    48 
    49     public static char charValue (Comparable c) {
    50         return ((Character) c).charValue();
    51     }
    52 
    53     public static byte byteValue (Comparable c) {
    54         return ((BigInteger) c).byteValue();
    55     }
    56 
    57     public static int intValue (Comparable c) {
    58         return ((BigInteger) c).intValue();
    59     }
    60 
    61     public static long longValue (Comparable c) {
    62         return ((BigInteger) c).longValue();
    63     }
    64 
    65     public static short shortValue (Comparable c) {
    66         return ((BigInteger) c).shortValue();
    67     }
    6820
    6921    public static Comparable newInt (String str) {
  • to-imperative/trunk/java/runtime/refal/plus/String.java

    r2882 r3418  
    1414    private String () {}
    1515
     16    @SuppressWarnings("unchecked")
    1617    private static void string (StringBuffer strbuf, Expr src) {
    17         for (Comparable obj : src) {
     18        for (Comparable<?> obj : src) {
    1819            if (obj instanceof Character)
    1920                strbuf.append((Character) obj);
     
    2526    }
    2627
     28    @SuppressWarnings("all")
    2729    @RefalFormat("$func String e.Source = s.String;")
    2830    public static void String (Expr src, Result res) throws RefalException {
     
    3638    }
    3739
     40    @SuppressWarnings("unchecked")
    3841    @RefalFormat("$func StringInit s.String s.Len s.Fill = ;")
    3942    public static void StringInit (Expr str, Expr len, Expr fill) throws RefalException {
     
    5760    }
    5861
     62    @SuppressWarnings("unchecked")
    5963    @RefalFormat("$func StringFill s.String s.Fill = ;")
    6064    public static void StringFill (Expr str, Expr fill) throws RefalException {
     
    7276    }
    7377
     78    @SuppressWarnings("unchecked")
    7479    @RefalFormat("$func StringLength s.String = s.Len;")
    7580    public static void StringLength (Expr str, Result res) throws RefalException {
     
    8388    }
    8489
     90    @SuppressWarnings("unchecked")
    8591    @RefalFormat("$func StringRef s.String s.Index = s.Char;")
    8692    public static void StringRef (Expr str, Expr idx, Result res) throws RefalException {
     
    102108    }
    103109
     110    @SuppressWarnings("unchecked")
    104111    @RefalFormat("$func StringSet s.String s.Index s.Char = ;")
    105112    public static void StringSet (Expr str, Expr idx, Expr ch) throws RefalException {
     
    122129    }
    123130
     131    @SuppressWarnings("unchecked")
    124132    @RefalFormat("$func StringReplace s.String e.Source = ;")
    125133    public static void StringReplace (Expr str, Expr src) throws RefalException {
     
    134142    }
    135143
     144    @SuppressWarnings("unchecked")
    136145    @RefalFormat("$func Substring s.String s.Index s.Len = s.NewString;")
    137146    public static void Substring (Expr str, Expr idx, Expr len, Result res) throws RefalException {
     
    157166    }
    158167
     168    @SuppressWarnings("unchecked")
    159169    @RefalFormat("$func SubstringFill s.String s.Index s.Len s.Fill = ;")
    160170    public static void SubstringFill (Expr str, Expr idx, Expr len, Expr fill) throws RefalException {
  • to-imperative/trunk/java/runtime/refal/plus/Table.java

    r2888 r3418  
    77package refal.plus;
    88
    9 import org.refal.plus.*;
    10 
    119import java.math.BigInteger;
    1210import java.util.Collection;
    1311import java.util.Map;
     12import java.util.Set;
     13
     14import org.refal.plus.Expr;
     15import org.refal.plus.RefalException;
     16import org.refal.plus.RefalFormat;
     17import org.refal.plus.Reference;
     18import org.refal.plus.Result;
     19import org.refal.plus.Symbol;
    1420
    1521public final class Table {
     
    1723    private Table () {}
    1824
     25    @SuppressWarnings("all")
    1926    @RefalFormat("$func Table = s.Tab;")
    2027    public static void Table (Result res) {
     
    2229    }
    2330
     31    @SuppressWarnings("unchecked")
    2432    @RefalFormat("$func Bind s.Tab (e.Key) (e.Val) = ;")
    2533    public static void Bind (Expr tab, Expr key, Expr val) throws RefalException {
     
    3240    }
    3341
     42    @SuppressWarnings("unchecked")
    3443    @RefalFormat("$func Unbind s.Tab e.Key = ;")
    3544    public static void Unbind (Expr tab, Expr key) throws RefalException {
     
    4251    }
    4352
     53    @SuppressWarnings("unchecked")
    4454    @RefalFormat("$func? Lookup s.Tab e.Key = e.Val;")
    4555    public static boolean Lookup (Expr tab, Expr key, Result val) throws RefalException {
     
    5666    }
    5767
     68    @SuppressWarnings("unchecked")
    5869    @RefalFormat("$func? IsInTable s.Tab e.Key = ;")
    5970    public static boolean IsInTable (Expr tab, Expr key) throws RefalException {
     
    6677    }
    6778
     79    @SuppressWarnings("unchecked")
    6880    @RefalFormat("$func Domain s.Tab = e.KeyList;")
    6981    public static void Domain (Expr tab, Result res) throws RefalException {
    7082        assert tab.length() == 1;
    7183        try {
    72             Collection<Expr> c = ((Reference<Map<Expr, Expr>>) tab.at(0)).object.keySet();
     84            Set<Expr> c = ((Reference<Map<Expr, Expr>>) tab.at(0)).object.keySet();
    7385            Expr.Concatenator concat = Expr.getConcatenator(c.size());
    7486            for (Expr expr : c)
    75                 concat.toRight((Comparable) expr);
     87                concat.toRight((Comparable<Expr>) expr);
    7688            res.assign(concat.yield());
    7789        } catch (ClassCastException _) {
     
    8092    }
    8193
     94    @SuppressWarnings("unchecked")
    8295    @RefalFormat("$func Values s.Tab = e.ValueList;")
    8396    public static void Values (Expr tab, Result res) throws RefalException {
     
    87100            Expr.Concatenator concat = Expr.getConcatenator(c.size());
    88101            for (Expr expr : c)
    89                 concat.toRight((Comparable) expr);
     102                concat.toRight((Comparable<Expr>) expr);
    90103            res.assign(concat.yield());
    91104        } catch (ClassCastException _) {
     
    94107    }
    95108
     109    @SuppressWarnings("unchecked")
    96110    @RefalFormat("$func Entries s.Tab = e.KeyValuePairs;")
    97111    public static void Entries (Expr tab, Result res) throws RefalException {
     
    101115            Expr.Concatenator concat = Expr.getConcatenator(map.size());
    102116            for (Map.Entry<Expr, Expr> pair : map.entrySet())
    103                 concat.toRight((Comparable) Expr.concat((Comparable) pair.getKey(), (Comparable) pair.getValue()));
     117                concat.toRight((Comparable<Expr>) Expr.concat((Comparable<Expr>) pair.getKey(), (Comparable<Expr>) pair.getValue()));
    104118            res.assign(concat.yield());
    105119        } catch (ClassCastException _) {
     
    108122    }
    109123
     124    @SuppressWarnings("unchecked")
    110125    @RefalFormat("$func TableCopy s.Tab = s.TabCopy;")
    111126    public static void TableCopy (Expr tab, Result res) throws RefalException {
     
    120135    }
    121136
     137    @SuppressWarnings("unchecked")
    122138    @RefalFormat("$func ReplaceTable s.TargetTab s.SourceTab = ;")
    123139    public static void ReplaceTable (Expr target, Expr source) throws RefalException {
     
    133149    }
    134150
     151    @SuppressWarnings("unchecked")
    135152    @RefalFormat("$func ClearTable s.Tab = ;")
    136153    public static void ClearTable (Expr tab) throws RefalException {
     
    143160    }
    144161
     162    @SuppressWarnings("unchecked")
    145163    @RefalFormat("$func TableSize s.Tab = s.Size;")
    146164    public static void TableSize (Expr tab, Result res) throws RefalException {
  • to-imperative/trunk/java/runtime/refal/plus/Vector.java

    r2888 r3418  
    1515    private Vector () {}
    1616
     17    @SuppressWarnings("unchecked")
    1718    private static void vector (List<Expr> list, Expr src) {
    18         for (Comparable obj : src) {
     19        for (Comparable<?> obj : src) {
    1920            if (obj instanceof Expr)
    2021                list.add((Expr) obj);
     
    2425    }
    2526
     27    @SuppressWarnings("all")
    2628    @RefalFormat("$func Vector e.Source = s.Vector;")
    2729    public static void Vector (Expr src, Result res) throws RefalException {
     
    3537    }
    3638
     39    @SuppressWarnings("unchecked")
    3740    @RefalFormat("$func VectorToExp s.Vector = e.Exp;")
    3841    public static void VectorToExp (Expr vec, Result res) {
     
    4548    }
    4649
     50    @SuppressWarnings("unchecked")
    4751    @RefalFormat("$func VectorInit s.Vector s.Len e.Fill = ;")
    4852    public static void VectorInit (Expr vec, Expr len, Expr fill) throws RefalException {
     
    6468    }
    6569
     70    @SuppressWarnings("unchecked")
    6671    @RefalFormat("$func VectorFill s.Vector e.Fill = ;")
    6772    public static void VectorFill (Expr vec, Expr fill) throws RefalException {
     
    7782    }
    7883
     84    @SuppressWarnings("unchecked")
    7985    @RefalFormat("$func VectorLength s.Vector = s.Len;")
    8086    public static void VectorLength (Expr vec, Result res) throws RefalException {
     
    8894    }
    8995
     96    @SuppressWarnings("unchecked")
    9097    @RefalFormat("$func VectorRef s.Vector s.Index = e.Exp;")
    9198    public static void VectorRef (Expr vec, Expr idx, Result res) throws RefalException {
     
    106113    }
    107114
     115    @SuppressWarnings("unchecked")
    108116    @RefalFormat("$func VectorSet s.Vector s.Index e.Exp = ;")
    109117    public static void VectorSet (Expr vec, Expr idx, Expr e) throws RefalException {
     
    124132    }
    125133
     134    @SuppressWarnings("unchecked")
    126135    @RefalFormat("$func VectorReplace s.Vector e.Source = ;")
    127136    public static void VectorReplace (Expr vec, Expr src) throws RefalException {
     
    136145    }
    137146
     147    @SuppressWarnings("unchecked")
    138148    @RefalFormat("$func Subvector s.Vector s.Index s.Len = s.NewVector;")
    139149    public static void Subvector (Expr vec, Expr idx, Expr len, Result res) throws RefalException {
     
    157167    }
    158168
     169    @SuppressWarnings("unchecked")
    159170    @RefalFormat("$func SubvectorFill s.Vector s.Index s.Len e.Fill = ;")
    160171    public static void SubvectorFill (Expr vec, Expr idx, Expr len, Expr fill) throws RefalException {
Note: See TracChangeset for help on using the changeset viewer.