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
ConstructorsConstructorDescriptionStringValueExtractor(@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 StringInvokes the method of the object passed to constructor and return its string result.@Nullable StringInvokes the method of the target object and return its string result.@Nullable StringgetStringValue(int ignoredValueID) This is an implementation of theStringSourceinterface.
-
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 theStringSourceinterface. It calls thegetString()method.- Parameters:
ignoredValueID- This parameter is ignored. It is put for compatibility with theStringSourceinterface.- Returns:
- The requested string value.
-
getCollectionValue
-