-
Notifications
You must be signed in to change notification settings - Fork 277
[SEC-179] Add annotations to java_class_typet #1831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
peterschrammel
merged 7 commits into
diffblue:develop
from
NathanJPhillips:feature/class-annotations
Apr 13, 2018
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ce1f4d2
Add annotations to java_class_typet, its methods and fields
NathanJPhillips 3ac6d17
Add type_dynamic_cast and friends for java_class_typet
NathanJPhillips e22b95b
Fix spurious virtual function related keywords
NathanJPhillips e6fb3bf
Pretty printing of java_class_typet
NathanJPhillips b06a27d
Introduce abstract qualifierst base class
NathanJPhillips ca77b4e
Add test for added annotations
NathanJPhillips 9a8d937
Add to_annotated_type and enable type_checked_cast for annotated_typet
NathanJPhillips File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,23 @@ | ||
@interface ClassAnnotation { | ||
} | ||
|
||
@interface MethodAnnotation { | ||
} | ||
|
||
@interface FieldAnnotation { | ||
} | ||
|
||
@ClassAnnotation | ||
public class annotations | ||
{ | ||
@FieldAnnotation | ||
public int x; | ||
|
||
@FieldAnnotation | ||
public static int y; | ||
|
||
@MethodAnnotation | ||
public void main() | ||
{ | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
regression/cbmc-java/annotations1/show_annotation_symbol.desc
This file contains hidden or 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,12 @@ | ||
CORE | ||
annotations.class | ||
--verbosity 10 --show-symbol-table | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^Type\.\.\.\.\.\.\.\.: @java::ClassAnnotation struct annotations | ||
^Type\.\.\.\.\.\.\.\.: @java::MethodAnnotation \(struct annotations \*\) -> void$ | ||
^Type\.\.\.\.\.\.\.\.: @java::FieldAnnotation int$ | ||
-- | ||
-- | ||
The purpose of the test is ensuring that annotations can be shown in the symbol | ||
table. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you even want to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To implement
clone
in derived classes we create an instance of the derived object, use this assignment to copy the base class data members to the new instance and then copy the derived class data.