Search:

Type: Posts; User: richip

Search: Search took 0.21 seconds.

  1. Replies
    7
    Views
    2,665

    Re: Variable Type-Checking

    But this is tying down the class type for value at the time the model variable is defined. I was hoping to tie it down to the fieldType parameter at compile-time. Note the two usage examples I had...
  2. Replies
    7
    Views
    2,665

    Re: Variable Type-Checking

    I tried the following snippet and it's not working as I was hoping it would, I'm coding out of ignorance right now:


    package blah;

    import java.util.Hashtable;
    import java.util.Map;

    public...
  3. Replies
    7
    Views
    2,665

    Re: Variable Type-Checking

    I got the "reflection" part, ;).

    Truth is, I'm actually refactoring code right now because the way we've implemented it (using J2SE) is we use method overloading to implement it. Basically, we...
  4. Replies
    7
    Views
    2,665

    Variable Type-Checking

    Is it possible to write a method whose parameter type is dependent on another parameter? In other words, if I had:

    void set(F fieldtype, V value);

    and the type of value will be checked at...
Results 1 to 4 of 4