Java Doc for Brace.java in  » IDE » DrJava » edu » rice » cs » drjava » model » definitions » reducedmodel » 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 » IDE » DrJava » edu.rice.cs.drjava.model.definitions.reducedmodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedToken
      edu.rice.cs.drjava.model.definitions.reducedmodel.Brace

Brace
class Brace extends ReducedToken implements ReducedModelStates(Code)
This class acts as the representation of a brace in the reduced view. It also includes information about the gap of plaintext preceding the actual brace before the previous brace or the start of the file. WARNING: the code in this class critically depends on the fact that literal strings are interned.
version:
   $Id: Brace.java 4255 2007-08-28 19:17:37Z mgricken $


Field Summary
final public static  intBLK_CMT_BEG_TYPE
    
final public static  intBLK_CMT_END_TYPE
    
final public static  intBRACES_LENGTH
    
final public static  intDOUBLE_ESCAPE_TYPE
    
final public static  intDOUBLE_QUOTE_TYPE
    
final public static  intEOLN_TYPE
    
final public static  intESCAPED_DOUBLE_QUOTE_TYPE
    
final public static  intESCAPED_SINGLE_QUOTE_TYPE
    
final public static  intLAST_BRACE_INDEX
    
final public static  intLINE_CMT_TYPE
    
final public static  intSINGLE_QUOTE_TYPE
    
final public static  intSLASH_TYPE
    
final public static  intSTAR_TYPE
    
final public static  String[]braces
     An array of the special characters that signify areas of text other than gaps.


Method Summary
public static  BraceMakeBrace(String type, ReducedModelState state)
     Virtual constructor.
public  voidflip()
     Flips the orientation of the brace.
public  intgetSize()
     the size of the brace and its preceding gap.
public  StringgetType()
     Get the text of the brace.
public  voidgrow(int delta)
     Braces can't grow.
public  booleanisBlockCommentEnd()
    
public  booleanisBlockCommentStart()
    
public  booleanisClosed()
     Indicates whether this is a closing brace.
public  booleanisClosedBrace()
    
public  booleanisDoubleEscape()
    
public  booleanisDoubleEscapeSequence()
    
public  booleanisDoubleQuote()
    
public  booleanisEscapedDoubleQuote()
    
public  booleanisEscapedSingleQuote()
    
public  booleanisGap()
     Implementation of abstract function.
public  booleanisLineComment()
    
public  booleanisMatch(Brace other)
     Check if two braces match.
public  booleanisMatchable()
     Determines if this Brace is matchable (one of "{", "}", "(", ")", "[", "]").
public  booleanisMultipleCharBrace()
    
public  booleanisNewline()
    
public  booleanisOpen()
     Indicates whether this is an opening brace.
public  booleanisOpenBrace()
    
public  booleanisSingleQuote()
    
public  booleanisSlash()
    
public  booleanisStar()
    
public  voidsetType(String type)
     Reset the type of this brace.
public  voidshrink(int delta)
     Braces can't shrink.
public  StringtoString()
     Converts a Brace to a String.

Field Detail
BLK_CMT_BEG_TYPE
final public static int BLK_CMT_BEG_TYPE(Code)



BLK_CMT_END_TYPE
final public static int BLK_CMT_END_TYPE(Code)



BRACES_LENGTH
final public static int BRACES_LENGTH(Code)



DOUBLE_ESCAPE_TYPE
final public static int DOUBLE_ESCAPE_TYPE(Code)



DOUBLE_QUOTE_TYPE
final public static int DOUBLE_QUOTE_TYPE(Code)



EOLN_TYPE
final public static int EOLN_TYPE(Code)



ESCAPED_DOUBLE_QUOTE_TYPE
final public static int ESCAPED_DOUBLE_QUOTE_TYPE(Code)



ESCAPED_SINGLE_QUOTE_TYPE
final public static int ESCAPED_SINGLE_QUOTE_TYPE(Code)



LAST_BRACE_INDEX
final public static int LAST_BRACE_INDEX(Code)



LINE_CMT_TYPE
final public static int LINE_CMT_TYPE(Code)



SINGLE_QUOTE_TYPE
final public static int SINGLE_QUOTE_TYPE(Code)



SLASH_TYPE
final public static int SLASH_TYPE(Code)



STAR_TYPE
final public static int STAR_TYPE(Code)



braces
final public static String[] braces(Code)
An array of the special characters that signify areas of text other than gaps. NOTE: this data structure is NOT simply a flat array. Matching characters are placed next to each other (except for the trailing elements, which have no matches). Notice that single and double quotes match themselves.
See Also:   String





Method Detail
MakeBrace
public static Brace MakeBrace(String type, ReducedModelState state)(Code)
Virtual constructor.
Parameters:
  type - the brace text
Parameters:
  state - whether the brace is shadwowed by a comment, quote etc a new Brace if type is valid, otherwise null
throws:
  BraceException - if the given type is not a valid brace type.



flip
public void flip()(Code)
Flips the orientation of the brace. Useful for updating quote information.



getSize
public int getSize()(Code)
the size of the brace and its preceding gap.



getType
public String getType()(Code)
Get the text of the brace. the text of the Brace



grow
public void grow(int delta)(Code)
Braces can't grow.
throws:
  RuntimeException -



isBlockCommentEnd
public boolean isBlockCommentEnd()(Code)
true if this is a block comment close delimiter



isBlockCommentStart
public boolean isBlockCommentStart()(Code)
true if this is a block comment open delimiter



isClosed
public boolean isClosed()(Code)
Indicates whether this is a closing brace. true if the brace is a closing brace.



isClosedBrace
public boolean isClosedBrace()(Code)
true if this is }|)|]



isDoubleEscape
public boolean isDoubleEscape()(Code)
true if this is \\



isDoubleEscapeSequence
public boolean isDoubleEscapeSequence()(Code)
true if this is \\ or \"



isDoubleQuote
public boolean isDoubleQuote()(Code)
true if this is a double quote



isEscapedDoubleQuote
public boolean isEscapedDoubleQuote()(Code)
true if this is \"



isEscapedSingleQuote
public boolean isEscapedSingleQuote()(Code)
true if this is \'



isGap
public boolean isGap()(Code)
Implementation of abstract function. Braces, of course, are never Gaps.



isLineComment
public boolean isLineComment()(Code)
true if this is a line comment delimiter



isMatch
public boolean isMatch(Brace other)(Code)
Check if two braces match.
Parameters:
  other - the brace to compare true if this is a match for other.



isMatchable
public boolean isMatchable()(Code)
Determines if this Brace is matchable (one of "{", "}", "(", ")", "[", "]").



isMultipleCharBrace
public boolean isMultipleCharBrace()(Code)
true if this is a multiple character brace



isNewline
public boolean isNewline()(Code)
true if this is a newline delimiter



isOpen
public boolean isOpen()(Code)
Indicates whether this is an opening brace. true if the brace is an opening brace.



isOpenBrace
public boolean isOpenBrace()(Code)
true if this is {|(|[



isSingleQuote
public boolean isSingleQuote()(Code)
true if this is a single quote



isSlash
public boolean isSlash()(Code)
true if this is /



isStar
public boolean isStar()(Code)
true if this is *



setType
public void setType(String type)(Code)
Reset the type of this brace.
Parameters:
  type - the new String type for the brace



shrink
public void shrink(int delta)(Code)
Braces can't shrink.
throws:
  RuntimeException -



toString
public String toString()(Code)
Converts a Brace to a String. Used for debugging. the string representation of the Brace.



Methods inherited from edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedToken
abstract public void flip()(Code)(Java Doc)
public int getHighlightState()(Code)(Java Doc)
abstract public int getSize()(Code)(Java Doc)
public ReducedModelState getState()(Code)(Java Doc)
abstract public String getType()(Code)(Java Doc)
abstract public void grow(int delta)(Code)(Java Doc)
public boolean inBlockComment()(Code)(Java Doc)
public boolean inLineComment()(Code)(Java Doc)
abstract public boolean isBlockCommentEnd()(Code)(Java Doc)
abstract public boolean isBlockCommentStart()(Code)(Java Doc)
abstract public boolean isClosed()(Code)(Java Doc)
abstract public boolean isClosedBrace()(Code)(Java Doc)
public boolean isCommented()(Code)(Java Doc)
abstract public boolean isDoubleEscape()(Code)(Java Doc)
abstract public boolean isDoubleEscapeSequence()(Code)(Java Doc)
abstract public boolean isDoubleQuote()(Code)(Java Doc)
abstract public boolean isEscapedDoubleQuote()(Code)(Java Doc)
abstract public boolean isEscapedSingleQuote()(Code)(Java Doc)
abstract public boolean isGap()(Code)(Java Doc)
abstract public boolean isLineComment()(Code)(Java Doc)
abstract public boolean isMatch(Brace other)(Code)(Java Doc)
abstract public boolean isMatchable()(Code)(Java Doc)
abstract public boolean isMultipleCharBrace()(Code)(Java Doc)
abstract public boolean isNewline()(Code)(Java Doc)
abstract public boolean isOpen()(Code)(Java Doc)
abstract public boolean isOpenBrace()(Code)(Java Doc)
public boolean isQuoted()(Code)(Java Doc)
public boolean isShadowed()(Code)(Java Doc)
abstract public boolean isSingleQuote()(Code)(Java Doc)
abstract public boolean isSlash()(Code)(Java Doc)
abstract public boolean isStar()(Code)(Java Doc)
public void setState(ReducedModelState state)(Code)(Java Doc)
abstract public void setType(String type)(Code)(Java Doc)
abstract public void shrink(int delta)(Code)(Java Doc)

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)

ww__w__.__j___a_v___a__2___s.___c__om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.