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