1 package com.puppycrawl.tools.checkstyle; 20 21 import java.util.HashMap ; 22 import java.util.Map ; 23 import java.util.Set ; 24 25 import com.puppycrawl.tools.checkstyle.api.Context; 26 27 31 public final class DefaultContext implements Context 32 { 33 34 private final Map mEntries = new HashMap (); 35 36 37 public Object get(String aKey) 38 { 39 return mEntries.get(aKey); 40 } 41 42 43 public String [] getAttributeNames() 44 { 45 final Set keySet = mEntries.keySet(); 46 return (String []) keySet.toArray(new String [keySet.size()]); 47 } 48 49 54 public void add(String aKey, Object aValue) 55 { 56 mEntries.put(aKey, aValue); 57 } 58 } 59 | Popular Tags |