org.apache.felix.dm.annotation.plugin.bnd
Class EntryWriter

java.lang.Object
  extended by org.apache.felix.dm.annotation.plugin.bnd.EntryWriter

public class EntryWriter
extends Object

This class encodes a component descriptor entry line, using json.


Constructor Summary
EntryWriter(EntryType type)
          Makes a new component descriptor entry.
 
Method Summary
 void put(EntryParam param, String value)
          Put a String parameter in this descritor entry.
 void put(EntryParam param, String[] array)
          Put a String[] parameter in this descriptor entry.
 void putClass(aQute.lib.osgi.Annotation annotation, EntryParam param, Object def)
          Get a class attribute value from an annotation and write it into this descriptor entry.
 void putClassArray(aQute.lib.osgi.Annotation annotation, EntryParam param, Object def)
          Get a class array attribute value from an annotation and write it into this descriptor entry.
 void putProperties(EntryParam param,  properties)
          Put a Map parameter in the descriptor entry.
 void putString(aQute.lib.osgi.Annotation annotation, EntryParam param, String def)
          Get a String attribute value from an annotation and write it into this descriptor entry.
 void putStringArray(aQute.lib.osgi.Annotation annotation, EntryParam param, String[] def)
          Get a String array attribute value from an annotation and write it into this descriptor entry.
 String toString()
          Returns a string representation for the given component descriptor entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryWriter

public EntryWriter(EntryType type)
Makes a new component descriptor entry.

Method Detail

toString

public String toString()
Returns a string representation for the given component descriptor entry.

Overrides:
toString in class Object

put

public void put(EntryParam param,
                String value)
Put a String parameter in this descritor entry.


put

public void put(EntryParam param,
                String[] array)
Put a String[] parameter in this descriptor entry.


putProperties

public void putProperties(EntryParam param,
                           properties)
Put a Map parameter in the descriptor entry. The map values must be either Strings or Strings arrays.


putString

public void putString(aQute.lib.osgi.Annotation annotation,
                      EntryParam param,
                      String def)
Get a String attribute value from an annotation and write it into this descriptor entry.


putStringArray

public void putStringArray(aQute.lib.osgi.Annotation annotation,
                           EntryParam param,
                           String[] def)
Get a String array attribute value from an annotation and write it into this descriptor entry.


putClass

public void putClass(aQute.lib.osgi.Annotation annotation,
                     EntryParam param,
                     Object def)
Get a class attribute value from an annotation and write it into this descriptor entry.


putClassArray

public void putClassArray(aQute.lib.osgi.Annotation annotation,
                          EntryParam param,
                          Object def)
Get a class array attribute value from an annotation and write it into this descriptor entry.



Copyright © 2011 Apache Software Foundation. All Rights Reserved.