|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.OCLInput
public final class OCLInput
Encapsulation of an OCL document, which may be obtained from a string or from a stream. The content of the OCL document consists of one or more context declarations (including constraints) with optional package declarations.
Constructor Summary | |
---|---|
OCLInput(InputStream oclStream)
Creates an OCL document from an input stream, using the default character set to decode it. |
|
OCLInput(InputStream oclStream,
String encoding)
Creates an OCL document from an input stream in the specified encoding. |
|
OCLInput(Reader oclReader)
Creates an OCL document from a character stream. |
|
OCLInput(String oclText)
Creates an OCL document from a string. |
Method Summary | |
---|---|
char[] |
getContent()
The contents of the OCL document as a character array, suitable for consumption by the OCL parser. |
Reader |
getContentAsStream()
The contents of the OCL document as a character stream, suitable for consumption by the OCL parser. |
String |
getContentAsString()
The contents of the OCL document as a character array, suitable for consumption by the OCL parser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCLInput(String oclText)
oclText
- the string containing the OCL documentpublic OCLInput(InputStream oclStream)
oclStream
- the input stream providing the OCL documentpublic OCLInput(InputStream oclStream, String encoding) throws UnsupportedEncodingException
oclStream
- the input stream providing the OCL documentencoding
- the stream's character encoding
UnsupportedEncodingException
- if the specified encoding is not
supported in this virtual machinepublic OCLInput(Reader oclReader)
oclReader
- the stream providing the OCL documentMethod Detail |
---|
public char[] getContent() throws ParserException
ParserException
- on an I/O failure in reading the contentpublic String getContentAsString() throws ParserException
ParserException
- on an I/O failure in reading the contentpublic Reader getContentAsStream()
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |