Java Doc for SelectorUtils.java in  » EJB-Server-geronimo » kernel » org » apache » geronimo » kernel » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server geronimo » kernel » org.apache.geronimo.kernel.config 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.geronimo.kernel.config.SelectorUtils

SelectorUtils
final public class SelectorUtils (Code)

This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.

This is a Singleton.


version:
   $Rev: 598385 $ $Date: 2007-11-26 10:57:33 -0800 (Mon, 26 Nov 2007) $




Method Summary
public static  String[]dissect(String path)
     Dissect the specified absolute path.
Parameters:
  path - the path to dissect.
public static  SelectorUtilsgetInstance()
     Retrieves the instance of the Singleton.
public static  booleanhasWildcards(String input)
    
public static  booleanisAbsolutePath(String filename)
     Verifies that the specified filename represents an absolute path. Differs from new java.io.File("filename").isAbsolute() in that a path beginning with a double file separator--signifying a Windows UNC--must at minimum match "\\a\b" to be considered an absolute path.
Parameters:
  filename - the filename to be checked.
public static  booleanisOutOfDate(File src, File target, int granularity)
     Returns dependency information on these two files.
public static  booleanmatch(String pattern, String str)
     Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character
Parameters:
  pattern - The pattern to match against.Must not be null.
Parameters:
  str - The string which must be matched against the pattern.Must not be null.
public static  booleanmatch(String pattern, String str, boolean isCaseSensitive)
     Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character
Parameters:
  pattern - The pattern to match against.Must not be null.
Parameters:
  str - The string which must be matched against the pattern.Must not be null.
Parameters:
  isCaseSensitive - Whether or not matching should be performedcase sensitively.
public static  booleanmatchPath(String pattern, String str)
     Tests whether or not a given path matches a given pattern.
Parameters:
  pattern - The pattern to match against.
public static  booleanmatchPath(String pattern, String str, boolean isCaseSensitive)
     Tests whether or not a given path matches a given pattern.
Parameters:
  pattern - The pattern to match against.
public static  booleanmatchPatternStart(String pattern, String str)
     Tests whether or not a given path matches the start of a given pattern up to the first "**".

This is not a general purpose test and should only be used if you can live with false positives.

public static  booleanmatchPatternStart(String pattern, String str, boolean isCaseSensitive)
     Tests whether or not a given path matches the start of a given pattern up to the first "**".

This is not a general purpose test and should only be used if you can live with false positives.

public static  StringremoveWhitespace(String input)
     "Flattens" a string by removing all whitespace (space, tab, linefeed, carriage return, and formfeed).
public static  StringrtrimWildcardTokens(String input)
    
public static  VectortokenizePath(String path)
     Breaks a path up into a Vector of path elements, tokenizing on File.separator.
Parameters:
  path - Path to tokenize.
public static  VectortokenizePath(String path, String separator)
     Breaks a path up into a Vector of path elements, tokenizing on
Parameters:
  path - Path to tokenize.



Method Detail
dissect
public static String[] dissect(String path)(Code)
Dissect the specified absolute path.
Parameters:
  path - the path to dissect. String[] {root, remaining path}.
throws:
  java.lang.NullPointerException - if path is null.



getInstance
public static SelectorUtils getInstance()(Code)
Retrieves the instance of the Singleton. singleton instance



hasWildcards
public static boolean hasWildcards(String input)(Code)
Tests if a string contains stars or question marks
Parameters:
  input - a String which one wants to test for containing wildcard true if the string contains at least a star or a question mark



isAbsolutePath
public static boolean isAbsolutePath(String filename)(Code)
Verifies that the specified filename represents an absolute path. Differs from new java.io.File("filename").isAbsolute() in that a path beginning with a double file separator--signifying a Windows UNC--must at minimum match "\\a\b" to be considered an absolute path.
Parameters:
  filename - the filename to be checked. true if the filename represents an absolute path.
throws:
  java.lang.NullPointerException - if filename is null.
since:
   Ant 1.6.3



isOutOfDate
public static boolean isOutOfDate(File src, File target, int granularity)(Code)
Returns dependency information on these two files. If src has been modified later than target, it returns true. If target doesn't exist, it likewise returns true. Otherwise, target is newer than src and is not out of date, thus the method returns false. It also returns false if the src file doesn't even exist, since how could the target then be out of date.
Parameters:
  src - the original file
Parameters:
  target - the file being compared against
Parameters:
  granularity - the amount in seconds of slack we will give indetermining out of dateness whether the target is out of date



match
public static boolean match(String pattern, String str)(Code)
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character
Parameters:
  pattern - The pattern to match against.Must not be null.
Parameters:
  str - The string which must be matched against the pattern.Must not be null. true if the string matches against the pattern,or false otherwise.



match
public static boolean match(String pattern, String str, boolean isCaseSensitive)(Code)
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character
Parameters:
  pattern - The pattern to match against.Must not be null.
Parameters:
  str - The string which must be matched against the pattern.Must not be null.
Parameters:
  isCaseSensitive - Whether or not matching should be performedcase sensitively. true if the string matches against the pattern,or false otherwise.



matchPath
public static boolean matchPath(String pattern, String str)(Code)
Tests whether or not a given path matches a given pattern.
Parameters:
  pattern - The pattern to match against. Must not benull.
Parameters:
  str - The path to match, as a String. Must not benull. true if the pattern matches against the string,or false otherwise.



matchPath
public static boolean matchPath(String pattern, String str, boolean isCaseSensitive)(Code)
Tests whether or not a given path matches a given pattern.
Parameters:
  pattern - The pattern to match against. Must not benull.
Parameters:
  str - The path to match, as a String. Must not benull.
Parameters:
  isCaseSensitive - Whether or not matching should be performedcase sensitively. true if the pattern matches against the string,or false otherwise.



matchPatternStart
public static boolean matchPatternStart(String pattern, String str)(Code)
Tests whether or not a given path matches the start of a given pattern up to the first "**".

This is not a general purpose test and should only be used if you can live with false positives. For example, pattern=**\a and str=b will yield true.
Parameters:
  pattern - The pattern to match against. Must not benull.
Parameters:
  str - The path to match, as a String. Must not benull. whether or not a given path matches the start of a givenpattern up to the first "**".




matchPatternStart
public static boolean matchPatternStart(String pattern, String str, boolean isCaseSensitive)(Code)
Tests whether or not a given path matches the start of a given pattern up to the first "**".

This is not a general purpose test and should only be used if you can live with false positives. For example, pattern=**\a and str=b will yield true.
Parameters:
  pattern - The pattern to match against. Must not benull.
Parameters:
  str - The path to match, as a String. Must not benull.
Parameters:
  isCaseSensitive - Whether or not matching should be performedcase sensitively. whether or not a given path matches the start of a givenpattern up to the first "**".




removeWhitespace
public static String removeWhitespace(String input)(Code)
"Flattens" a string by removing all whitespace (space, tab, linefeed, carriage return, and formfeed). This uses StringTokenizer and the default set of tokens as documented in the single arguement constructor.
Parameters:
  input - a String to remove all whitespace. a String that has had all whitespace removed.



rtrimWildcardTokens
public static String rtrimWildcardTokens(String input)(Code)
removes from a pattern all tokens to the right containing wildcards
Parameters:
  input - the input string the leftmost part of the pattern without wildcards



tokenizePath
public static Vector tokenizePath(String path)(Code)
Breaks a path up into a Vector of path elements, tokenizing on File.separator.
Parameters:
  path - Path to tokenize. Must not be null. a Vector of path elements from the tokenized path



tokenizePath
public static Vector tokenizePath(String path, String separator)(Code)
Breaks a path up into a Vector of path elements, tokenizing on
Parameters:
  path - Path to tokenize. Must not be null.
Parameters:
  separator - the separator against which to tokenize. a Vector of path elements from the tokenized path
since:
   Ant 1.6



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.