|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.haefelinger.flaka.util.Static
public final class Static
From the basis of an XML source, creates a list of dependencies.
| Field Summary | |
|---|---|
static String |
EL
|
static int |
PROPTY
|
static int |
VARREF
|
static int |
WRITEPROPTY
|
| Constructor Summary | |
|---|---|
Static()
|
|
| Method Summary | |
|---|---|
static void |
_log_(Project P,
String msg,
int type)
|
static Project |
assign(Project project,
String key,
Object obj,
int type)
Assign an object either as variable or as property to a given project. |
static int |
bitset(int bitset,
int bit,
boolean on)
|
static String[] |
bufread(File fname)
|
static String[] |
bufread(String buf)
|
static String |
cat(Project P,
File file)
|
static String |
center(String S,
int width,
String chr)
|
static void |
close(InputStream is)
|
static void |
close(OutputStream os)
|
static void |
close(Reader r)
|
static void |
close(Writer w)
|
static AntTypeDefinition |
compdef(Project project,
String property)
|
static ComponentHelper |
comphelper(Project P)
|
static int |
contains(String v,
char c)
|
static void |
copy(InputStream src,
OutputStream dst)
|
static void |
debug(Project P,
String msg)
|
static void |
debug(Project P,
String msg,
Exception e)
|
static boolean |
el2bool(Project project,
String expr)
Evaluate a EL expression in a boolean context. |
static File |
el2file(Project project,
String expr)
|
static Object |
el2obj(Project project,
String expr)
Evaluate EL expression. |
static String |
el2str(Project project,
String expr)
Evaluate EL expression in a string context. |
static String |
elresolve(Project project,
String text)
Resolve embedded EL references in text. |
static boolean |
empty(String s)
|
static void |
error(Project P,
String msg)
|
static void |
error(Project P,
String msg,
Exception e)
|
protected static String |
escape(char c,
char esc)
escape non-alphanumeric character c by escape character
esc. |
protected static String |
escape(String s,
char esc)
escape all non-alphanumeric characters in s by escape
character esc. |
static void |
fcopy(File src,
File dst)
|
static Field |
fieldbyname(Class clazz,
String name)
|
static Object |
filter(Project project,
String property)
|
static String |
flushxml(Project P,
Element root,
File file)
|
static String |
flushxml(Project P,
Element root,
StringBuffer buf)
|
static Object |
getattr(Object obj,
String name)
|
static Class |
getclass(Project P,
String s)
shortcut to get a component's class |
static String |
getstem(String S)
|
static Document |
getxmldoc(InputStream stream)
|
static String[] |
grep(Project project,
String regexpr)
|
static boolean |
htabremove(Object obj,
String att,
String key)
Removes a Hashtable entry. |
static void |
info(Project P,
String msg)
|
static void |
info(Project P,
String msg,
Exception e)
|
static Object |
invoke(Object obj,
String name,
Class[] type,
Object[] args)
|
static boolean |
isbinary(char c)
* test whether a character is a 'textual' character, i.e. |
static boolean |
isEmpty(String s)
|
static boolean |
ismacrodef(Project P,
String s)
|
static boolean |
ispatternchar(char c)
|
static boolean |
isprintable(char c)
* test whether a character is printable. |
static boolean |
isproperty(Project P,
String property)
|
static boolean |
isreference(Project P,
String id)
|
static boolean |
isregexchar(char c)
|
static boolean |
issubclass(Class clazz,
Class base)
tests whether class obj is a subclass of
base. |
static boolean |
istarget(Project P,
String s)
|
static boolean |
istask(Project P,
String s)
|
static boolean |
istaskdef(Project P,
String s)
|
static boolean |
istext(char c)
* test whether a character is a 'textual' character, i.e. |
static String |
jar2var(String V)
Translates a given loc name in it's official dependency name. |
static Element |
loadxml(Project P,
File file)
|
static void |
log(Project P,
String msg)
|
static void |
log(Project P,
String msg,
Exception e)
|
static String |
logo(String msg)
|
static String |
logo(String msg,
int width)
|
static AntTypeDefinition |
macrodef(Project project,
String property)
|
static Object |
makecomp(Project P,
String s)
shortcut to create a component |
static Method |
methodbyname(Class C,
String name,
Class[] type)
|
static String |
mkchrseq(String c,
int n)
|
static String |
nodeattribute(Node node,
String name,
String otherwise)
|
static String |
patternAsRegex(String glob)
|
static Pattern |
patterncompile(String S,
int f)
A standard way to compile a given pattern into a RE Pattern. |
static String |
property(Project P,
String property)
|
static String |
q(String s)
|
static String |
readlines(File src)
|
static String |
readlines(InputStream src)
|
static String |
readlines(Reader reader)
|
static String |
readlines(String src)
|
static Object |
reference(Project P,
String id)
|
protected static String |
replace(String s,
char c,
String sub)
replace all c characters in s with string
sub. |
static void |
setattr(Object obj,
String name,
Object val)
|
static String[] |
split(String v,
String c)
|
static String |
stripEmptyLines(String buf)
|
protected static String |
substring(String s,
int i,
int J)
similar as s.substring(i,j) except that j is allowed to be
larger than s.length(). |
static String |
tag2ver(String V)
|
static Object |
target(Project project,
String property)
|
static AntTypeDefinition |
task(Project project,
String property)
|
static AntTypeDefinition |
taskdef(Project project,
String property)
|
static void |
throwbx(String S)
|
static void |
throwbx(String S,
Exception e)
|
protected static void |
tidyxml(DOMSource source)
Cleans up the empty lines and tab after removing the nodes |
static File |
toFile(Project project,
String s)
|
static String |
trim2(String s,
String otherwise)
Trim a given string. |
static String |
trim3(Project project,
String s,
String otherwise)
|
static String |
trimNonDigit(String V)
|
static Object |
type(Project project,
String property)
|
static Project |
unset(Project project,
String... properties)
|
static Object |
valueof(Object obj,
String name)
|
static void |
verbose(Project P,
String msg)
|
static void |
verbose(Project P,
String msg,
Exception e)
|
static int |
vercmp(String va,
String vb)
|
static void |
warning(Project P,
String msg)
|
static void |
warning(Project P,
String msg,
Exception e)
|
static int |
write(File name,
String s,
boolean mode)
|
static void |
writex(File f,
String buf,
boolean append)
|
static void |
writex(InputStream cin,
String fname,
boolean mode)
|
static Document |
xmldoc(File file)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EL
public static final int VARREF
public static final int PROPTY
public static final int WRITEPROPTY
| Constructor Detail |
|---|
public Static()
| Method Detail |
|---|
public static final Project assign(Project project,
String key,
Object obj,
int type)
project - not nullkey - not nullobj - null allowedtype - must be either Static.VARREF, Static.PROPTY or Static.WRITEPROPTY
public static final void _log_(Project P,
String msg,
int type)
public static final void log(Project P,
String msg,
Exception e)
public static final void log(Project P,
String msg)
public static final void info(Project P,
String msg,
Exception e)
public static final void info(Project P,
String msg)
public static final void verbose(Project P,
String msg,
Exception e)
public static final void verbose(Project P,
String msg)
public static final void debug(Project P,
String msg,
Exception e)
public static final void debug(Project P,
String msg)
public static final void error(Project P,
String msg,
Exception e)
public static final void error(Project P,
String msg)
public static final void warning(Project P,
String msg,
Exception e)
public static final void warning(Project P,
String msg)
public static final void writex(File f,
String buf,
boolean append)
throws IOException
IOExceptionpublic static final void close(Writer w)
public static final void close(OutputStream os)
public static final void close(InputStream is)
public static final void close(Reader r)
public static final int write(File name,
String s,
boolean mode)
public static final void writex(InputStream cin,
String fname,
boolean mode)
throws IOException
IOExceptionpublic static String readlines(Reader reader)
public static final String readlines(InputStream src)
public static final String readlines(String src)
public static final String readlines(File src)
public static final String[] bufread(String buf)
public static final String[] bufread(File fname)
public static final String[] split(String v,
String c)
public static final String trimNonDigit(String V)
public static final int contains(String v,
char c)
public static final String tag2ver(String V)
public static final String jar2var(String V)
public static final String mkchrseq(String c,
int n)
public static final String center(String S,
int width,
String chr)
public static final String logo(String msg,
int width)
public static final String logo(String msg)
public static final void throwbx(String S)
public static final void throwbx(String S,
Exception e)
public static final int vercmp(String va,
String vb)
public static final String getstem(String S)
throws BuildException
BuildException
public static final void fcopy(File src,
File dst)
throws Exception
Exception
public static final void copy(InputStream src,
OutputStream dst)
throws Exception
Exception
public static final String[] grep(Project project,
String regexpr)
throws Exception
Exception
public static final Method methodbyname(Class C,
String name,
Class[] type)
throws NoSuchMethodException,
SecurityException
NoSuchMethodException
SecurityException
public static final Object invoke(Object obj,
String name,
Class[] type,
Object[] args)
throws Exception
Exception
public static final Field fieldbyname(Class clazz,
String name)
public static final Object getattr(Object obj,
String name)
throws IllegalAccessException
IllegalAccessException
public static final void setattr(Object obj,
String name,
Object val)
throws IllegalAccessException
IllegalAccessException
public static final Object valueof(Object obj,
String name)
throws IllegalAccessException
IllegalAccessException
public static final boolean htabremove(Object obj,
String att,
String key)
att of object instance obj. * The entry to remove
is given by key key. Note that * this method does not care
about accessability, i.e. it allows * to remove a key from a private
Hashtable. * *
obj - might be null *att - might be null *key - might be null * *
att.
public static final boolean issubclass(Class clazz,
Class base)
obj is a subclass of
base. * *
public static final ComponentHelper comphelper(Project P)
public static final AntTypeDefinition compdef(Project project,
String property)
public static final Object makecomp(Project P,
String s)
public static final Class getclass(Project P,
String s)
public static final boolean isproperty(Project P,
String property)
public static final boolean isreference(Project P,
String id)
public static final boolean istarget(Project P,
String s)
public static final boolean istask(Project P,
String s)
public static final boolean istaskdef(Project P,
String s)
public static final boolean ismacrodef(Project P,
String s)
public static final String property(Project P,
String property)
public static final Object reference(Project P,
String id)
public static final Object target(Project project,
String property)
public static final AntTypeDefinition taskdef(Project project,
String property)
public static final AntTypeDefinition macrodef(Project project,
String property)
public static final AntTypeDefinition task(Project project,
String property)
public static final Object type(Project project,
String property)
public static final Object filter(Project project,
String property)
public static final String patternAsRegex(String glob)
protected static final String escape(String s,
char esc)
s by escape
character esc.
s - not null
protected static final String escape(char c,
char esc)
c by escape character
esc.
c - character in questionesc - the escape character
c if c is alpanumeric character otherwise
return esc.
protected static final String replace(String s,
char c,
String sub)
c characters in s with string
sub.
s - not null
protected static final String substring(String s,
int i,
int J)
s.substring(i,j) except that j is allowed to be
larger than s.length(). If j is less then
i, the empty string is returned. Otherwise function behaves as
s.substring(i,j).
s - not nullpublic static final boolean isprintable(char c)
c - character to test *
public static final boolean istext(char c)
c - character to test *
public static final boolean isbinary(char c)
c - character to test *
public static final String trim3(Project project,
String s,
String otherwise)
public static final String trim2(String s,
String otherwise)
public static final boolean empty(String s)
public static final boolean isEmpty(String s)
public static final String cat(Project P,
File file)
public static final Document xmldoc(File file)
throws Exception
Exception
public static final Element loadxml(Project P,
File file)
public static final String stripEmptyLines(String buf)
protected static final void tidyxml(DOMSource source)
source -
public static final String flushxml(Project P,
Element root,
StringBuffer buf)
public static final String flushxml(Project P,
Element root,
File file)
public static final String nodeattribute(Node node,
String name,
String otherwise)
public static final Document getxmldoc(InputStream stream)
throws Exception
Exceptionpublic static final boolean isregexchar(char c)
public static final boolean ispatternchar(char c)
public static final Pattern patterncompile(String S,
int f)
/ is used, then the enclosed string is a
treated regular expression. If that is not the case, then a pattern
expression is assumed.% is used, a pattern expression is assumed
public static final String elresolve(Project project,
String text)
text.
Text can be an arbitrary text containing one or more references
to EL expressions #{..}. Resolving a reference means
that the embedded EL expression is evaluated into an object and
stringized in a second step.
public static final String el2str(Project project,
String expr)
public static final Object el2obj(Project project,
String expr)
#{} references. The expression is simply evaluated and
not coerced.
public static final File el2file(Project project,
String expr)
public static final boolean el2bool(Project project,
String expr)
#{..}.
public static final String q(String s)
public static final File toFile(Project project,
String s)
public static final Project unset(Project project,
String... properties)
public static final int bitset(int bitset,
int bit,
boolean on)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||