myGrid

typesafe resolve method on DataFacade

Details

  • Type: Refinement Refinement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.7
  • Fix Version/s: 2.0 essential
  • Component/s: t2 maelstrom
  • Labels:
    None

Description

Raised by Matthew Pocock

In DataFacade, can we change:

public Object resolve(EntityIdentifier entityId, Class<?> desiredType)

to:

public <T> T resolve(EntityIdentifier entityId, Class<T> desiredType)

or:

public <T> T resolve(EntityIdentifier entityId, Class<? extends T>
desiredType)

whichever is easier? I think the latter is the correct one.

I don't like casting in client code. The magik should all happen in library
code IMHO.

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    2008-02-25 13:33
    Updated:
    2008-03-24 21:05