Annotation Sniffer Hotspots implementation

2,652 views

Published on

How were add hotspots into Annotation Sniffer software to decouple and extends software design.

Published in: Lifestyle, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,652
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Annotation Sniffer Hotspots implementation

  1. 1. Annotation Sniffer Hotspots
  2. 2. Annotation Sniffer What? Annotation Sniffer is an Eclipse plugin to detect Annotation's Bad Smells. How? Download Annotation Sniffer Java ARchive (JAR) file; place into dropins Eclipse’s directory and done! Why? Code metrics are important; Annotations are code; Code should be well written;
  3. 3. Hotspot: Metrics Targets: • Change XML file to Read directory files; • Only files with @IsAMetric annotation; • Should keep original output;
  4. 4. Load all metrics with annotation  MetricsRepository injected as dependency into MetricsEvaluator  Held old output interface
  5. 5. Hotspot: Thresholds Targets: • Remove Thresholds information from BadSmellDetector class; • Create a pluggable way to add new Thresholds data; • Load thresholds on the fly (able to load other Threshold’s data file) • Keep old output interface.
  6. 6. Old way
  7. 7. New way XML file
  8. 8. Threshold Object Diagram
  9. 9. Hotspot: Bad Smell Targets: • Change hard-coded to Read directory classes; • Only class with @BadSmell annotation; • Decouple a BadSmell from Threshold and Metric.
  10. 10. Old way
  11. 11. New way
  12. 12. Annotation Sniffer Metrics as Hotspot: https://github.com/hlegius/annotation_sniffer/pull/1 Thresholds as Hotspot: https://github.com/hlegius/annotation_sniffer/pull/2 BadSmell as Hotspot: https://github.com/hlegius/annotation_sniffer/pull/5 https://github.com/hlegius/annotation_sniffer

×