public class GenericStatsImpl extends Object implements Stats
Stats interface. This class
implements the same interface and does that job. All that implementing classes
have to do is implement the specific accessing methods in their Stats interfaces
and delegate the rest to this class. This class invokes all these methods in
implementing class through introspection. | Constructor and Description |
|---|
GenericStatsImpl(Class statsInterface,
Object statsProvider)
Constructs a new instance of this class for a given interface and its implementation.
|
GenericStatsImpl(String statsInterfaceName,
ClassLoader loader,
Object statsProvider) |
GenericStatsImpl(String statsInterfaceName,
Object statsProvider) |
| Modifier and Type | Method and Description |
|---|---|
Statistic |
getStatistic(String statisticName)
Get a Statistic by name.
|
String[] |
getStatisticNames()
Returns an array of Strings which are the names of the attributes from the specific Stats submodel that this object supports.
|
Statistic[] |
getStatistics()
Returns an array containing all of the Statistic objects supported by this Stats object.
|
public GenericStatsImpl(String statsInterfaceName, Object statsProvider) throws ClassNotFoundException
ClassNotFoundExceptionpublic GenericStatsImpl(String statsInterfaceName, ClassLoader loader, Object statsProvider) throws ClassNotFoundException
ClassNotFoundExceptionpublic GenericStatsImpl(Class statsInterface, Object statsProvider)
Statistic interface.NullPointerException - if any of the given parameters are nullIllegalArgumentException - if the contract is not satisfied by given parameterspublic Statistic getStatistic(String statisticName)
StatsgetStatistic in interface Statspublic String[] getStatisticNames()
StatsgetStatisticNames in interface Statspublic Statistic[] getStatistics()
StatsgetStatistics in interface StatsCopyright © 2017. All rights reserved.