public class GFmtOptFactory extends Object
| Constructor and Description |
|---|
GFmtOptFactory() |
| Modifier and Type | Method and Description |
|---|---|
static GFmtOpt |
newInstance() |
static GFmtOpt |
newInstance(String sessionId)
create an new instance
|
static GFmtOpt |
newRegisteredCopy(GFmtOpt source)
A registered copy of
source: every public, non-static, non-final
field copied into a new instance registered under a fresh unique session
id. |
static void |
remove(String sessionId)
Forget the instance registered under
sessionId. |
public GFmtOptFactory()
public static GFmtOpt newInstance(String sessionId)
sessionId - the session idpublic static GFmtOpt newInstance()
public static GFmtOpt newRegisteredCopy(GFmtOpt source)
source: every public, non-static, non-final
field copied into a new instance registered under a fresh unique session
id. Parts of the pp formatter re-read their options by session id
(getOption()), so options that are not registered are silently
replaced there by defaults (blank lines, tabs, line numbers, the compact
mode width, block bodies). Callers formatting per request must release
the copy with remove(String) when done.source - the options to copy; must not be null