Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
DiSL
DiSL
Commits
c28d2b62
Commit
c28d2b62
authored
Sep 09, 2011
by
Lukáš Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added initialization check
parent
0d3d96c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/ch/usi/dag/disl/DiSL.java
src/ch/usi/dag/disl/DiSL.java
+9
-1
No files found.
src/ch/usi/dag/disl/DiSL.java
View file @
c28d2b62
...
...
@@ -33,6 +33,8 @@ import ch.usi.dag.disl.staticinfo.StaticInfo;
import
ch.usi.dag.disl.weaver.Weaver
;
import
ch.usi.dag.jborat.agent.Instrumentation
;
// TODO better public API - marker pkg should be in disl pkg, class visibility (and pkg) cleanup everywhere
// - maybe expose classes in user package and other are considered non visible :)
// TODO javadoc comment all
public
class
DiSL
implements
Instrumentation
{
...
...
@@ -46,8 +48,13 @@ public class DiSL implements Instrumentation {
// instances are created lazily when needed in StaticInfo
Map
<
Class
<?>,
Object
>
staticAnalysisInstances
;
public
void
initialize
()
{
// this method should be called only once
public
synchronized
void
initialize
()
{
if
(
snippets
!=
null
)
{
throw
new
DiSLFatalException
(
"DiSL cannot be initialized twice"
);
}
// report every exception within our code - don't let anyone mask it
try
{
...
...
@@ -242,6 +249,7 @@ public class DiSL implements Instrumentation {
return
selectedMarking
;
}
// this method is thread safe after initialization
public
void
instrument
(
ClassNode
classNode
)
{
if
(
snippets
==
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment