esoe
2 years ago
5 changed files with 24 additions and 21 deletions
@ -1,15 +1,21 @@
@@ -1,15 +1,21 @@
|
||||
@startuml Files |
||||
title Files class diagram |
||||
class File { |
||||
String name |
||||
byte size |
||||
class Storage { |
||||
Extension extension |
||||
String readAnnotation() |
||||
void main |
||||
} |
||||
enum Format{ |
||||
enum Extension{ |
||||
DOCUMENT |
||||
IMAGE |
||||
AUDIO |
||||
VIDEO |
||||
OTHER |
||||
} |
||||
annotation File { |
||||
String name() |
||||
byte size() |
||||
Extension extension () |
||||
} |
||||
|
||||
@enduml |
@ -1,9 +1,8 @@
@@ -1,9 +1,8 @@
|
||||
import annota |
||||
Format (name=noname; size=0; extension=Extension.OTHER) |
||||
public class File { |
||||
private String name; |
||||
private byte size; |
||||
|
||||
//читаем днные аннотации
|
||||
|
||||
@Inherited |
||||
@Target(ElementType.TYPE) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
public @interface File { |
||||
String name() default "noname"; |
||||
byte size() default "0"; |
||||
Extension extension () default Extension.OTHER; |
||||
} |
||||
|
@ -1,8 +0,0 @@
@@ -1,8 +0,0 @@
|
||||
@Inherited |
||||
@Target(ElementType.TYPE) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
public @interface Format { |
||||
String name() default "noname"; |
||||
byte size() default "0"; |
||||
Extension extension () default Extension.OTHER; |
||||
} |
Loading…
Reference in new issue