nl.tudelft.tbm.eeni.owl2java.formatter
Class CodeFormatter

java.lang.Object
  extended by nl.tudelft.tbm.eeni.owl2java.formatter.CodeFormatter

public class CodeFormatter
extends Object

Wrapper class for Eclipse JDT code formatter


Constructor Summary
CodeFormatter()
          Constructor for CodeFormatter with default options
CodeFormatter(Properties formatterSettings)
          Constructor for CodeFormatter with given settings; if given null, loads default formatter settings
 
Method Summary
 String format(String code)
          Formats source code using current formatter settings
 Properties getFormatterSettings()
          Returns a Properties object representing containing all the code formatter options
 void setFormatterSettings(Properties formatterSettings)
          Sets the formatter options; if given null, reverts to default formatter options
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeFormatter

public CodeFormatter()
Constructor for CodeFormatter with default options


CodeFormatter

public CodeFormatter(Properties formatterSettings)
Constructor for CodeFormatter with given settings; if given null, loads default formatter settings

Method Detail

format

public String format(String code)
Formats source code using current formatter settings


getFormatterSettings

public Properties getFormatterSettings()
Returns a Properties object representing containing all the code formatter options


setFormatterSettings

public void setFormatterSettings(Properties formatterSettings)
Sets the formatter options; if given null, reverts to default formatter options



Copyright © 2011. All Rights Reserved.