/** * Updates the value of an attribute in the list of attributes. *get * @param key * @param val */ public void putAttribute(String key, String val) { addAttribute(key, val); }
/** * Appends an attribute to the list of attributes. * * @param key * @param val */ public void addAttribute(String key, String val) { addAttribute(Attribute.of(key, val)); }
public <T> void addAttribute(Key<T> key, T val) { addAttribute(new Attribute<>(key, val)); }
public <T> void addAttribute(TypeToken<T> key, Annotation annotation, T val) { addAttribute(Key.get(key, annotation), val); }
public <T> void addAttribute(Class<T> key, String annotation, T val) { addAttribute(Key.get(key, Names.named(annotation)), val); }
public <T> void addAttribute(Class<T> key, T val) { addAttribute(Key.get(key), val); }
public <T> void addAttribute(TypeToken<T> key, T val) { addAttribute(Key.get(key), val); }
public <T> void addAttribute(TypeToken<T> key, String annotation, T val) { addAttribute(Key.get(key, Names.named(annotation)), val); }
public <T> void addAttribute(Class<T> key, Annotation annotation, T val) { addAttribute(Key.get(key, annotation), val); }
node.addAttribute(markLoc(loc, Attribute.of(key, val)));