## org.eclipse.ocl.lpg
Interface FormattingHelper

All Known Implementing Classes:
  AbstractFormattingHelper

    public interface FormattingHelper

A FormattingHelper provides string contributions to problem messages endeavouring to be as helpful as possible even when faced with malformed or null objects.

Method Summary
`String` `formatClass(Object object)` Return the Java class name of object. e.g.
`String` `formatEClassName(EObject eObject)` Return the Ecore class name of object. e.g.
`String` `formatName(Object object)` Return the name of object. e.g.
`String` `formatPath(List<String> pathName)` Return a hierarchical path name. e.g.
`String` `formatPath(List<String> pathName, String name)` Return a hierarchically named name. e.g.
`String` `formatQualifiedName(Object object)` Return the qualified name of an object. e.g.
`String` `formatString(String string)` Return the string. e.g.
`String` `formatType(Object type)` Return the type of object. e.g.

Method Detail

### formatClass

    String formatClass(Object object)

  Return the Java class name of object. e.g. "org.eclipse.ocl.FormattingHelper".

  Parameters:
    `object` - to be formatted
  Returns:
    non-null string describing the class of object

### formatEClassName

    String formatEClassName(EObject eObject)

  Return the Ecore class name of object. e.g. "EOperation"

  Parameters:
    `object` - to be formatted
  Returns:
    non-null string describing the Ecore class of object

### formatName

    String formatName(Object object)

  Return the name of object. e.g. "name". The name may be obtained by using known name methods such as ENamedElement.getName().

  Parameters:
    `object` - to be formatted
  Returns:
    non-null string describing the name of object

### formatQualifiedName

    String formatQualifiedName(Object object)

  Return the qualified name of an object. e.g. "A::B::name".

  Parameters:
    `object` - to be formatted
  Returns:
    non-null string describing the qualified name of the object

### formatPath

    String formatPath(List<String> pathName)

  Return a hierarchical path name. e.g. "A::B::C"

  Parameters:
    `pathName` - to be formatted
  Returns:
    non-null string describing the pathName

### formatPath

    String formatPath(List<String> pathName,
                      String name)

  Return a hierarchically named name. e.g. "A::B::C.D"

  Parameters:
    `pathName` - to be formatted
    `name` - to be suffixed
  Returns:
    non-null string describing the class of object

### formatString

    String formatString(String string)

  Return the string. e.g. "string"

  Parameters:
    `string` - to be formatted
  Returns:
    non-null string describing string

### formatType

    String formatType(Object type)

  Return the type of object. e.g. "Set(String)". The type may be obtained by using known type methods such as ETypedElement.getType().

  Parameters:
    `object` - to be formatted
  Returns:
    non-null string describing the type of object

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.