[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[e4-dev] Question on Java5 features IEclipseContext
|
Hi,
Is there a reason IEclipseContext defining methods like this:
1. Using Object as return type
==============================
---------8<---------
public Object get(String name);
// vs
public <V> V get(String name);
---------8<---------
This leads to unnecassary casts in the client code. E.g.
---------8<---------
IStylingEngine stylingEngine = (IStylingEngine) getContext(element)
.get(IStylingEngine.SERVICE_NAME);
// vs
IStylingEngine stylingEngine = getContext(element)
.get(IStylingEngine.SERVICE_NAME)
---------8<---------
2. Not using Ellipsis
=====================
---------8<---------
public Object get(String name, Object[] arguments);
// vs
public Object get(String name, Object... arguments);
---------8<---------
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1 A-6020 innsbruck phone ++43 512 935834