public void substitute(InterpolationHelper.SubstitutionCallback callback) { if (callback == null) { callback = new InterpolationHelper.BundleContextSubstitutionCallback(null); } InterpolationHelper.performSubstitution(storage, callback); }
@Override public Object put(String key, Object value) { if (value instanceof String && !storage.typed) { return storage.put(key, (String) value); } else { ensureTyped(); String old = storage.put(key, convertToString(value)); return old != null ? convertFromString(old) : null; } }
@Override public Object get(Object key) { String v = storage.get(key); return storage.typed && v != null ? convertFromString(v) : v; }
public Object put(String key, List<String> commentLines, List<String> valueLines) { String old = storage.put(key, commentLines, valueLines); return old != null ? storage.typed ? convertFromString(old) : old : null; }
/** * Writes the given property and its value. * * @param key the property key * @param value the property value * @throws java.io.IOException if an error occurs */ public void writeProperty(String key, String value) throws IOException { write(escapeKey(key)); write(" = "); write(typed ? value : escapeJava(value)); writeln(null); }
public void load(Reader reader) throws IOException { storage.loadLayout(reader, true); substitute(callback); }
@Override public Object put(String key, Object value) { if (value instanceof String && !storage.typed) { return storage.put(key, (String) value); } else { ensureTyped(); String old = storage.put(key, convertToString(value)); return old != null ? convertFromString(old) : null; } }
public Object put(String key, List<String> commentLines, List<String> valueLines) { String old = storage.put(key, commentLines, valueLines); return old != null ? storage.typed ? convertFromString(old) : old : null; }
public void substitute(InterpolationHelper.SubstitutionCallback callback) { if (callback == null) { callback = new InterpolationHelper.BundleContextSubstitutionCallback(null); } InterpolationHelper.performSubstitution(storage, callback); }
@Override public Object get(Object key) { String v = storage.get(key); return storage.typed && v != null ? convertFromString(v) : v; }
public void load(Reader reader) throws IOException { storage.loadLayout(reader, true); substitute(callback); }
@Override public Object put(String key, Object value) { if (value instanceof String && !storage.typed) { return storage.put(key, (String) value); } else { ensureTyped(); String old = storage.put(key, convertToString(value)); return old != null ? convertFromString(old) : null; } }
public Object put(String key, List<String> commentLines, List<String> valueLines) { String old = storage.put(key, commentLines, valueLines); return old != null ? storage.typed ? convertFromString(old) : old : null; }
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on * @param context The bundle context */ public static void performSubstitution(Map<String,String> properties, BundleContext context) { performSubstitution(properties, new BundleContextSubstitutionCallback(context)); }
@Override public Object get(Object key) { String v = storage.get(key); return storage.typed && v != null ? convertFromString(v) : v; }
public void load(Reader reader) throws IOException { storage.loadLayout(reader, true); substitute(callback); }
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on * @param context The bundle context */ public static void performSubstitution(Map<String,String> properties, BundleContext context) { performSubstitution(properties, new BundleContextSubstitutionCallback(context)); }
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on * @param context The bundle context */ public static void performSubstitution(Map<String,String> properties, BundleContext context) { performSubstitution(properties, new BundleContextSubstitutionCallback(context)); }
public void substitute(InterpolationHelper.SubstitutionCallback callback) { if (callback == null) { callback = new InterpolationHelper.BundleContextSubstitutionCallback(null); } InterpolationHelper.performSubstitution(storage, callback); }
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on */ public static void performSubstitution(Map<String,String> properties, BundleContext context) { performSubstitution(properties, new BundleContextSubstitutionCallback(context)); }