private static List<String> convertSpecialStringTags(List<String> extraArgs) { if (extraArgs == null) { return null; } List<String> args = new ArrayList<String>(); for (String arg : extraArgs) { args.add(StringToObjectConverter.convertSpecialStringTags(arg)); } return args; }
/** {@inheritDoc} */ public JmxWriteRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxWriteRequest( pStack.pop(), // object name pStack.pop(), // attribute name StringToObjectConverter.convertSpecialStringTags(pStack.pop()), // value prepareExtraArgs(pStack), // path pParams); }
/** * Deserialize a string representation to an object for a given type * * @param pType type to convert to * @param pValue the value to convert from * @return the converted value */ public Object convertFromString(String pType, String pValue) { String value = convertSpecialStringTags(pValue); if (value == null) { return null; } if (pType.startsWith("[") && pType.length() >= 2) { return convertToArray(pType, value); } Parser parser = PARSER_MAP.get(pType); if (parser != null) { return parser.extract(value); } Object cValue = convertByConstructor(pType, pValue); if (cValue != null) { return cValue; } throw new IllegalArgumentException( "Cannot convert string " + value + " to type " + pType + " because no converter could be found"); }
private static List<String> convertSpecialStringTags(List<String> extraArgs) { if (extraArgs == null) { return null; } List<String> args = new ArrayList<String>(); for (String arg : extraArgs) { args.add(StringToObjectConverter.convertSpecialStringTags(arg)); } return args; }
private static List<String> convertSpecialStringTags(List<String> extraArgs) { if (extraArgs == null) { return null; } List<String> args = new ArrayList<String>(); for (String arg : extraArgs) { args.add(StringToObjectConverter.convertSpecialStringTags(arg)); } return args; }
/** {@inheritDoc} */ public JmxWriteRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxWriteRequest( pStack.pop(), // object name pStack.pop(), // attribute name StringToObjectConverter.convertSpecialStringTags(pStack.pop()), // value prepareExtraArgs(pStack), // path pParams); }
/** {@inheritDoc} */ public JmxWriteRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxWriteRequest( pStack.pop(), // object name pStack.pop(), // attribute name StringToObjectConverter.convertSpecialStringTags(pStack.pop()), // value prepareExtraArgs(pStack), // path pParams); }
/** * Deserialize a string representation to an object for a given type * * @param pType type to convert to * @param pValue the value to convert from * @return the converted value */ public Object convertFromString(String pType, String pValue) { String value = convertSpecialStringTags(pValue); if (value == null) { return null; } if (pType.startsWith("[") && pType.length() >= 2) { return convertToArray(pType, value); } Parser parser = PARSER_MAP.get(pType); if (parser != null) { return parser.extract(value); } Object cValue = convertByConstructor(pType, pValue); if (cValue != null) { return cValue; } throw new IllegalArgumentException( "Cannot convert string " + value + " to type " + pType + " because no converter could be found"); }
/** * Deserialize a string representation to an object for a given type * * @param pType type to convert to * @param pValue the value to convert from * @return the converted value */ public Object convertFromString(String pType, String pValue) { String value = convertSpecialStringTags(pValue); if (value == null) { return null; } if (pType.startsWith("[") && pType.length() >= 2) { return convertToArray(pType, value); } Parser parser = PARSER_MAP.get(pType); if (parser != null) { return parser.extract(value); } Object cValue = convertByConstructor(pType, pValue); if (cValue != null) { return cValue; } throw new IllegalArgumentException( "Cannot convert string " + value + " to type " + pType + " because no converter could be found"); }