com.sun.enterprise.tools
Class InhabitantsDescriptor

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,String>
          extended by com.sun.enterprise.tools.InhabitantsDescriptor
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class InhabitantsDescriptor
extends HashMap<String,String>

Inhabitants descriptor as a map from the class name to its line.

Author:
Kohsuke Kawaguchi, Jeff Trent
See Also:
InhabitantFileBasedParser, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
InhabitantsDescriptor()
           
InhabitantsDescriptor(File f)
           
 
Method Summary
 void appendComment(String comment)
           
 void enableCommentOutput(boolean enabled)
           
 void enableDateOutput(boolean enabled)
           
 void load(File f)
          Loads an existing file.
 String put(String key, String value)
           
 String putAll(String service, Collection<String> contracts, Collection<String> annotations, String name, Object metaObj)
           
 String remove(Object key)
           
 void setComment(String comment)
           
 String toString()
           
 void write(File out)
           
 void write(File outputDir, Messager messager, String habitatName)
          Writes the descriptor to a file.
 void write(PrintWriter w)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

InhabitantsDescriptor

public InhabitantsDescriptor()

InhabitantsDescriptor

public InhabitantsDescriptor(File f)
                      throws IOException
Throws:
IOException
Method Detail

enableDateOutput

public void enableDateOutput(boolean enabled)

enableCommentOutput

public void enableCommentOutput(boolean enabled)

setComment

public void setComment(String comment)

appendComment

public void appendComment(String comment)

load

public void load(File f)
          throws IOException
Loads an existing file.

Throws:
IOException

put

public String put(String key,
                  String value)
Specified by:
put in interface Map<String,String>
Overrides:
put in class HashMap<String,String>

putAll

public String putAll(String service,
                     Collection<String> contracts,
                     Collection<String> annotations,
                     String name,
                     Object metaObj)

remove

public String remove(Object key)
Specified by:
remove in interface Map<String,String>
Overrides:
remove in class HashMap<String,String>

write

public void write(File outputDir,
                  Messager messager,
                  String habitatName)
Writes the descriptor to a file.


write

public void write(File out)
           throws IOException
Throws:
IOException

write

public void write(PrintWriter w)

toString

public String toString()
Overrides:
toString in class AbstractMap<String,String>


Copyright © 2013 Oracle Corporation. All Rights Reserved.