Package microsim.reflection
Class StringValueExtractor
java.lang.Object
microsim.reflection.AbstractValueExtractor
microsim.reflection.StringValueExtractor
- See Also:
-
Field Summary
Fields inherited from class microsim.reflection.AbstractValueExtractor
field, method, target
-
Constructor Summary
ConstructorDescriptionStringValueExtractor
(@NonNull Object target, @NonNull String fieldName, boolean isMethod) StringValueExtractor
(@Nullable Class<?> target, @NonNull String fieldName, boolean isMethod) -
Method Summary
Modifier and TypeMethodDescription@NonNull String[]
getCollectionValue
(@NonNull Collection<?> c) @Nullable String
Invokes the method of the object passed to constructor and return its string result.@Nullable String
Invokes the method of the target object and return its string result.@Nullable String
getStringValue
(int ignoredValueID) This is an implementation of theStringSource
interface.
-
Constructor Details
-
StringValueExtractor
-
StringValueExtractor
-
-
Method Details
-
getString
Invokes the method of the target object and return its string result.- Parameters:
target
- An object containing the method.- Returns:
- The requested string value.
-
getString
Invokes the method of the object passed to constructor and return its string result.- Returns:
- the requested string value.
-
getStringValue
This is an implementation of theStringSource
interface. It calls thegetString()
method.- Parameters:
ignoredValueID
- This parameter is ignored. It is put for compatibility with theStringSource
interface.- Returns:
- The requested string value.
-
getCollectionValue
-