tudresden.ocl.injection.ocl
Class OclInstrumentor
java.lang.Object
tudresden.ocl.injection.ocl.OclInstrumentor
- All Implemented Interfaces:
- TaskInstrumentor
- public final class OclInstrumentor
- extends Object
- implements TaskInstrumentor
Method Summary |
private void |
fillInSignature(StringBuffer buf,
JavaMethod jm)
|
private int |
getInvariantScope(int modifier)
|
String |
getMutex()
|
private boolean |
hasInvariantScope(JavaFeature jf)
|
private String |
makeContext(JavaMethod jm)
|
private String |
makeSignature(JavaMethod jm)
Returns the signature of this method. |
void |
onAttributeChanged(Writer o,
JavaAttribute ja,
boolean is_weakly_typed)
|
void |
onClassEnd(Writer o,
JavaClass jc)
|
void |
onClassEndPerFeature(Writer o,
JavaFeature jf)
|
void |
onClassFeature(JavaFeature jf,
String doccomment)
|
void |
onDocComment(JavaClass jc,
String doccomment)
Called for any non-file-level javadoc comment inside a class jc. |
void |
onFileDocComment(JavaClass jc,
String doccomment)
Called for file-level javadoc comments that can be linked to a class jc. |
void |
onWrapperConstructor(Writer o,
JavaConstructor jc)
|
void |
onWrapperDefaultConstructor(Writer o,
JavaClass jc)
|
void |
onWrapperPost(Writer o,
JavaMethod jm)
|
void |
onWrapperPre(Writer o,
JavaMethod jm)
|
private void |
processConstraint(Object o,
String type,
String context)
|
void |
setLineSeparator(String lineSeparator)
|
private void |
writeInvariant(Writer o,
String classname,
CodeFragment cf)
|
private void |
writeInvariantCall(Writer o)
|
private void |
writeInvariants(Writer o,
String classname)
|
private void |
writeObserver(Writer o,
JavaFeature jf)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
config
private OclConfig config
codefragments
private HashMap codefragments
- Type names are keys, SortedFragments values.
violationmacro
private String violationmacro
tracechecking
private boolean tracechecking
lineSeparator
private String lineSeparator
OclInstrumentor
public OclInstrumentor(OclConfig config)
setLineSeparator
public void setLineSeparator(String lineSeparator)
- Specified by:
setLineSeparator
in interface TaskInstrumentor
onFileDocComment
public void onFileDocComment(JavaClass jc,
String doccomment)
- Called for file-level javadoc comments that can be linked to a class jc.
- Specified by:
onFileDocComment
in interface TaskInstrumentor
onDocComment
public void onDocComment(JavaClass jc,
String doccomment)
- Description copied from interface:
TaskInstrumentor
- Called for any non-file-level javadoc comment inside a class jc.
- Specified by:
onDocComment
in interface TaskInstrumentor
processConstraint
private final void processConstraint(Object o,
String type,
String context)
onClassFeature
public void onClassFeature(JavaFeature jf,
String doccomment)
- Specified by:
onClassFeature
in interface TaskInstrumentor
fillInSignature
private final void fillInSignature(StringBuffer buf,
JavaMethod jm)
makeSignature
private final String makeSignature(JavaMethod jm)
- Returns the signature of this method.
Is compatible to
CodeFragment.getConstrainedOperation()
.
makeContext
private final String makeContext(JavaMethod jm)
onAttributeChanged
public void onAttributeChanged(Writer o,
JavaAttribute ja,
boolean is_weakly_typed)
throws IOException
- Specified by:
onAttributeChanged
in interface TaskInstrumentor
- Throws:
IOException
getMutex
public String getMutex()
- Specified by:
getMutex
in interface TaskInstrumentor
onWrapperConstructor
public void onWrapperConstructor(Writer o,
JavaConstructor jc)
throws IOException
- Specified by:
onWrapperConstructor
in interface TaskInstrumentor
- Throws:
IOException
onWrapperDefaultConstructor
public void onWrapperDefaultConstructor(Writer o,
JavaClass jc)
throws IOException
- Specified by:
onWrapperDefaultConstructor
in interface TaskInstrumentor
- Throws:
IOException
onWrapperPre
public void onWrapperPre(Writer o,
JavaMethod jm)
throws IOException
- Specified by:
onWrapperPre
in interface TaskInstrumentor
- Throws:
IOException
onWrapperPost
public void onWrapperPost(Writer o,
JavaMethod jm)
throws IOException
- Specified by:
onWrapperPost
in interface TaskInstrumentor
- Throws:
IOException
onClassEndPerFeature
public void onClassEndPerFeature(Writer o,
JavaFeature jf)
throws IOException
- Specified by:
onClassEndPerFeature
in interface TaskInstrumentor
- Throws:
IOException
onClassEnd
public void onClassEnd(Writer o,
JavaClass jc)
throws IOException
- Specified by:
onClassEnd
in interface TaskInstrumentor
- Throws:
IOException
writeInvariants
private final void writeInvariants(Writer o,
String classname)
throws IOException
- Throws:
IOException
writeInvariant
private final void writeInvariant(Writer o,
String classname,
CodeFragment cf)
throws IOException
- Throws:
IOException
writeInvariantCall
private final void writeInvariantCall(Writer o)
throws IOException
- Throws:
IOException
writeObserver
private final void writeObserver(Writer o,
JavaFeature jf)
throws IOException
- Throws:
IOException
getInvariantScope
private final int getInvariantScope(int modifier)
hasInvariantScope
private final boolean hasInvariantScope(JavaFeature jf)
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.