1 23 24 package org.objectweb.fractal.adl; 25 26 import java.util.HashMap ; 27 import java.util.Map ; 28 29 32 33 public abstract class AbstractNode implements Node { 34 35 private String type; 36 37 private String source; 38 39 private Map decorations = new HashMap (); 40 41 public AbstractNode (final String type) { 42 this.type = type; 43 } 44 45 49 public String astGetType () { 50 return type; 51 } 52 53 public String astGetSource () { 54 return source; 55 } 56 57 public void astSetSource (final String source) { 58 this.source = source; 59 } 60 61 public Object astGetDecoration(String name) { 62 return decorations.get(name); 63 } 64 65 public Map astGetDecorations() { 66 return new HashMap (decorations); 67 } 68 69 public void astSetDecoration(String name, Object decoration) { 70 decorations.put(name, decoration); 71 } 72 73 public void astSetDecorations(Map decorations) { 74 this.decorations.putAll(decorations); 75 } 76 77 } 78 | Popular Tags |