|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttudresden.ocl.injection.Instrumentor
Field Summary | |
static String |
BACKUP_SUFFIX
|
static String |
CHANGED_CHECKER
|
private InstrumentorClass |
class_state
Holds several properties of the class currently worked on. |
private ArrayList |
class_state_stack
Collects the class states of outer classes, when operating on a inner class. |
private boolean |
clean
|
private InstrumentorConfig |
config
|
private boolean |
delayinsertions
|
private boolean |
discardnextfeature
|
private String |
identityhashcode
|
protected String |
lineSeparator
|
private String |
m_sFileDocComment
The last file level doccomment that was read. |
static String |
OCL_AUTHOR
All generated class features get this string as author. |
private Writer |
output
|
Constructor Summary | |
Instrumentor(Writer output,
InstrumentorConfig config)
|
Method Summary | |
private boolean |
isCollection(JavaFeature jf)
Returns, whether the type of the given java feature is a collection or not. |
private boolean |
isWeaklyTyped(JavaFeature jf)
Returns, whether the type of the given java feature can be typed by element-type tags or not. |
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 jc)
Encountered a class header. |
void |
onClassEnd(JavaClass jc)
Encountered the end of a class. |
void |
onClassFeature(JavaFeature jf,
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. |
private void |
writeBackup(JavaFeature jf)
|
private void |
writeCall(JavaMethod jm)
|
private void |
writeChangedChecker()
|
private void |
writeChangedCheckerCall()
|
private void |
writeDefaultConstructor(JavaClass jc)
See Java Language Specification 8.6.7 "Default Constructor" |
private void |
writeWrapper(JavaBehaviour jb)
|
private void |
writeWrapper(JavaConstructor jc)
|
private void |
writeWrapper(JavaMethod jm)
|
private void |
writeWrapperHeader(JavaBehaviour jb)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final Writer output
private final boolean delayinsertions
private final boolean clean
private final InstrumentorConfig config
private final String identityhashcode
private InstrumentorClass class_state
private ArrayList class_state_stack
class_state
protected String lineSeparator
private String m_sFileDocComment
private boolean discardnextfeature
public static final String OCL_AUTHOR
Injector.findDocTag(java.lang.String, java.lang.String)
,
Constant Field Valuespublic static final String BACKUP_SUFFIX
public static final String CHANGED_CHECKER
Constructor Detail |
public Instrumentor(Writer output, InstrumentorConfig config)
Method Detail |
public void onPackage(JavaFile javafile) throws InjectorParseException
InjectionConsumer
onPackage
in interface InjectionConsumer
InjectorParseException
JavaFile.getPackageName()
public void onImport(String importname)
InjectionConsumer
onImport
in interface InjectionConsumer
JavaFile.findType(String)
public void onClass(JavaClass jc)
InjectionConsumer
onClass
in interface InjectionConsumer
public void onClassEnd(JavaClass jc) throws IOException, InjectorParseException
InjectionConsumer
onClassEnd
in interface InjectionConsumer
IOException
InjectorParseException
InjectionConsumer.onClass(JavaClass)
public void onBehaviourHeader(JavaBehaviour jb) throws IOException
InjectionConsumer
InjectionConsumer.onClassFeature(JavaFeature, String)
.
onBehaviourHeader
in interface InjectionConsumer
IOException
public void onAttributeHeader(JavaAttribute ja)
InjectionConsumer
InjectionConsumer.onClassFeature(JavaFeature, String)
.
onAttributeHeader
in interface InjectionConsumer
public void onClassFeature(JavaFeature jf, String doccomment) throws IOException, InjectorParseException
InjectionConsumer
InjectionConsumer.onBehaviourHeader(JavaBehaviour)
.
onClassFeature
in interface InjectionConsumer
IOException
InjectorParseException
public boolean onDocComment(String doccomment) throws IOException
InjectionConsumer
onDocComment
in interface InjectionConsumer
IOException
public void onFileDocComment(String doccomment) throws IOException
InjectionConsumer
onFileDocComment
in interface InjectionConsumer
IOException
public void onFileEnd()
InjectionConsumer
onFileEnd
in interface InjectionConsumer
private final void writeCall(JavaMethod jm) throws IOException
IOException
private final boolean isCollection(JavaFeature jf) throws InjectorParseException
InjectorParseException
JavaFile.findType(String)
private final boolean isWeaklyTyped(JavaFeature jf) throws InjectorParseException
isCollection(JavaFeature)
,
except for arrays, where it returns false.
May cause problems, as described in findType's
documentation.
InjectorParseException
JavaFile.findType(String)
private final void writeBackup(JavaFeature jf) throws IOException, InjectorParseException
IOException
InjectorParseException
private final void writeChangedCheckerCall() throws IOException
IOException
private final void writeChangedChecker() throws IOException, InjectorParseException
IOException
InjectorParseException
private final void writeWrapperHeader(JavaBehaviour jb) throws IOException
IOException
private final void writeWrapper(JavaBehaviour jb) throws IOException
IOException
private final void writeWrapper(JavaConstructor jc) throws IOException
IOException
private final void writeWrapper(JavaMethod jm) throws IOException
IOException
private final void writeDefaultConstructor(JavaClass jc) throws IOException
IOException
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |