org.apache.felix.gogo.shell
Class Converters
java.lang.Object
org.apache.felix.gogo.shell.Converters
- All Implemented Interfaces:
- Converter
public class Converters
- extends Object
- implements Converter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Converters
public Converters(BundleContext context)
bundle
public Bundle bundle(Bundle i)
convert
public Object convert( desiredType,
Object in)
throws Exception
- Description copied from interface:
Converter
- Convert an object to the desired type.
Return null if the conversion can not be done. Otherwise return and
object that extends the desired type or implements it.
- Specified by:
convert
in interface Converter
- Parameters:
desiredType
- The type that the returned object can be assigned toin
- The object that must be converted
- Returns:
- An object that can be assigned to the desired type or null.
- Throws:
Exception
format
public CharSequence format(Object target,
int level,
Converter converter)
throws IOException
- Description copied from interface:
Converter
- Convert an objet to a CharSequence object in the requested format. The
format can be INSPECT, LINE, or PART. Other values must throw
IllegalArgumentException.
- Specified by:
format
in interface Converter
- Parameters:
target
- The object to be converted to a Stringlevel
- One of INSPECT, LINE, or PART.converter
- Use this object to format sub ordinate objects.
- Returns:
- A printed object of potentially multiple lines
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.