Dresden OCL Toolkit

tudresden.ocl.injection.test
Class TestInjectionConsumer

java.lang.Object
  extended bytudresden.ocl.injection.test.TestInjectionConsumer
All Implemented Interfaces:
InjectionConsumer

public class TestInjectionConsumer
extends Object
implements InjectionConsumer


Field Summary
private  Writer output
           
 
Constructor Summary
TestInjectionConsumer(Writer output)
           
 
Method Summary
 void onAttributeHeader(JavaAttribute ja)
          Encountered the header of a java attribute.
 void onBehaviourHeader(JavaBehaviour jb)
          Encountered the header of a java method.
 void onClass(JavaClass cc)
          Encountered a class header.
 void onClassEnd(JavaClass cc)
          Encountered the end of a class.
 void onClassFeature(JavaFeature cf, String doccomment)
          Called for attributes and methods.
 boolean onDocComment(String doccomment)
          Encountered a java documentation comment.
 void onFileDocComment(String doccomment)
          Encountered a java documentation comment.
 void onFileEnd()
          Encountered the end of the input stream.
 void onImport(String importname)
          Encountered an import statement.
 void onPackage(JavaFile javafile)
          Encountered a package statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

output

private Writer output
Constructor Detail

TestInjectionConsumer

public TestInjectionConsumer(Writer output)
Method Detail

onPackage

public void onPackage(JavaFile javafile)
               throws InjectorParseException
Description copied from interface: InjectionConsumer
Encountered a package statement. This method is guaranteed to be called at most once.

Specified by:
onPackage in interface InjectionConsumer
Throws:
InjectorParseException
See Also:
JavaFile.getPackageName()

onImport

public void onImport(String importname)
Description copied from interface: InjectionConsumer
Encountered an import statement. Imports are also saved in JavaFile.imports. This information may be used for mapping type names to types.

Specified by:
onImport in interface InjectionConsumer
See Also:
JavaFile.findType(String)

onClass

public void onClass(JavaClass cc)
Description copied from interface: InjectionConsumer
Encountered a class header. Is also called for inner classes.

Specified by:
onClass in interface InjectionConsumer

onClassEnd

public void onClassEnd(JavaClass cc)
                throws IOException,
                       InjectorParseException
Description copied from interface: InjectionConsumer
Encountered the end of a class.

Specified by:
onClassEnd in interface InjectionConsumer
Throws:
IOException
InjectorParseException
See Also:
InjectionConsumer.onClass(JavaClass)

onBehaviourHeader

public void onBehaviourHeader(JavaBehaviour jb)
                       throws IOException
Description copied from interface: InjectionConsumer
Encountered the header of a java method. Is called additionally to InjectionConsumer.onClassFeature(JavaFeature, String).

Specified by:
onBehaviourHeader in interface InjectionConsumer
Throws:
IOException

onAttributeHeader

public void onAttributeHeader(JavaAttribute ja)
                       throws IOException
Description copied from interface: InjectionConsumer
Encountered the header of a java attribute. Is called additionally to InjectionConsumer.onClassFeature(JavaFeature, String).

Specified by:
onAttributeHeader in interface InjectionConsumer
Throws:
IOException

onClassFeature

public void onClassFeature(JavaFeature cf,
                           String doccomment)
                    throws IOException,
                           InjectorParseException
Description copied from interface: InjectionConsumer
Called for attributes and methods. Is called additionally to InjectionConsumer.onBehaviourHeader(JavaBehaviour).

Specified by:
onClassFeature in interface InjectionConsumer
Throws:
IOException
InjectorParseException

onDocComment

public boolean onDocComment(String doccomment)
                     throws IOException
Description copied from interface: InjectionConsumer
Encountered a java documentation comment. Is called for comments on class level only, i.e. inside a class, but outside of methods and attributes.

Specified by:
onDocComment in interface InjectionConsumer
Returns:
if false is returned, the next class feature is ignored.
Throws:
IOException

onFileDocComment

public void onFileDocComment(String doccomment)
                      throws IOException
Description copied from interface: InjectionConsumer
Encountered a java documentation comment. Is called for comments on file level only, i.e. outside of any classes.

Specified by:
onFileDocComment in interface InjectionConsumer
Throws:
IOException

onFileEnd

public void onFileEnd()
Description copied from interface: InjectionConsumer
Encountered the end of the input stream.

Specified by:
onFileEnd in interface InjectionConsumer

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.