|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjas.statistics.reflectors.StringInvoker
public class StringInvoker
Not of interest for users. It uses java reflection to call objects' methods which return string values. It is used by database objects.
Title: JAS
Description: Java Agent-based Simulation library
Copyright (C) 2002 Michele Sonnessa
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
| Field Summary |
|---|
| Fields inherited from interface jas.statistics.IStringSource |
|---|
DEFAULT |
| Constructor Summary | |
|---|---|
StringInvoker(java.lang.Class target,
java.lang.String fieldName,
boolean isMethod)
Constructor. |
|
StringInvoker(java.lang.Object target,
java.lang.String fieldName,
boolean isMethod)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getCollectionValue(java.util.Collection c)
|
java.lang.String |
getString()
Invoke the method of the object passed to constructor and return its double result. |
java.lang.String |
getString(java.lang.Object target)
Invoke the method of the target object and return its string result. |
java.lang.String |
getStringValue(int valueID)
This is an implementation of the IDblSource interface. |
static boolean |
isStringSource(java.lang.Class trgClass,
java.lang.String varName,
boolean isMethod)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringInvoker(java.lang.Class target,
java.lang.String fieldName,
boolean isMethod)
target - It is the class of the target object.fieldName - A string representing the name of the method to invoke.isMethod - If true the fieldName is a method, otherwise it is a
property of the object.
public StringInvoker(java.lang.Object target,
java.lang.String fieldName,
boolean isMethod)
target - It is the target object.fieldName - A string representing the name of the method to invoke.isMethod - If true the fieldName is a method, otherwise it is a
property of the object.| Method Detail |
|---|
public java.lang.String[] getCollectionValue(java.util.Collection c)
public java.lang.String getString()
public java.lang.String getString(java.lang.Object target)
target - Object to be invoked.
public java.lang.String getStringValue(int valueID)
getStringValue in interface IStringSourcevalueID - This parameter is ignored. It is put for compatibility
with the IDblSource interface.
public static boolean isStringSource(java.lang.Class trgClass,
java.lang.String varName,
boolean isMethod)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||