-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly handle object type names when no role name is present.
- Loading branch information
Showing
9 changed files
with
135 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* (c) https://github.com/MontiCore/monticore */ | ||
package example; | ||
|
||
|
||
public class C { | ||
|
||
|
||
protected D d; | ||
|
||
public void setD(D d) { | ||
this.d = d; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* (c) https://github.com/MontiCore/monticore */ | ||
package example; | ||
|
||
import java.util.Optional; | ||
|
||
public class CBuilder extends C { | ||
|
||
public CBuilder d(D d) { | ||
this.d = d; | ||
return this; | ||
} | ||
|
||
public Optional<C> build() { | ||
return Optional.of(this); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* (c) https://github.com/MontiCore/monticore */ | ||
package example; | ||
|
||
public class D { | ||
|
||
protected int i; | ||
|
||
public int getI() { | ||
return i; | ||
} | ||
|
||
public void setI(int i) { | ||
this.i = i; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* (c) https://github.com/MontiCore/monticore */ | ||
package example; | ||
|
||
import java.util.Optional; | ||
|
||
public class DBuilder extends D { | ||
|
||
public DBuilder i(int i) { | ||
this.i = i; | ||
return this; | ||
} | ||
|
||
public Optional<D> build() { | ||
return Optional.of(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,20 @@ objectdiagram Examples { | |
|
||
link foo <-> (blub) bar; | ||
|
||
/*u1: User { | ||
String username = "Alice"; | ||
String password = "Alice123"; | ||
String email = "[email protected]"; | ||
SehubRole role = SehubRole.OWNER; | ||
};*/ | ||
|
||
|
||
|
||
t1: C {}; | ||
|
||
d: D { | ||
i = 1; | ||
}; | ||
|
||
e: D { | ||
i = 2; | ||
}; | ||
|
||
link t1 -> d; | ||
link t1 -> e; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters