From 41aa33521b0b562d711e4eddd6c1dbacfc2902cd Mon Sep 17 00:00:00 2001 From: esoe Date: Wed, 19 Oct 2022 16:03:32 +0300 Subject: [PATCH] qq --- files/src/main/docs/diagrams/src/Files.puml | 14 ++++++++++---- files/src/main/java/ru/molokoin/Extension.java | 1 - files/src/main/java/ru/molokoin/File.java | 15 +++++++-------- files/src/main/java/ru/molokoin/Format.java | 8 -------- files/src/main/java/ru/molokoin/Storage.java | 7 +++++++ 5 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 files/src/main/java/ru/molokoin/Format.java create mode 100644 files/src/main/java/ru/molokoin/Storage.java diff --git a/files/src/main/docs/diagrams/src/Files.puml b/files/src/main/docs/diagrams/src/Files.puml index 2df3767..58bf6a0 100644 --- a/files/src/main/docs/diagrams/src/Files.puml +++ b/files/src/main/docs/diagrams/src/Files.puml @@ -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 \ No newline at end of file diff --git a/files/src/main/java/ru/molokoin/Extension.java b/files/src/main/java/ru/molokoin/Extension.java index 9e4b683..3345c31 100644 --- a/files/src/main/java/ru/molokoin/Extension.java +++ b/files/src/main/java/ru/molokoin/Extension.java @@ -4,5 +4,4 @@ public enum Extension { AUDIO, VIDEO, OTHER; - } diff --git a/files/src/main/java/ru/molokoin/File.java b/files/src/main/java/ru/molokoin/File.java index 8cc0d3c..268d9d5 100644 --- a/files/src/main/java/ru/molokoin/File.java +++ b/files/src/main/java/ru/molokoin/File.java @@ -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; } diff --git a/files/src/main/java/ru/molokoin/Format.java b/files/src/main/java/ru/molokoin/Format.java deleted file mode 100644 index daf6f36..0000000 --- a/files/src/main/java/ru/molokoin/Format.java +++ /dev/null @@ -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; -} diff --git a/files/src/main/java/ru/molokoin/Storage.java b/files/src/main/java/ru/molokoin/Storage.java new file mode 100644 index 0000000..3d9b0af --- /dev/null +++ b/files/src/main/java/ru/molokoin/Storage.java @@ -0,0 +1,7 @@ +//import annota +@File (name=noname, size=0, extension=Extension.OTHER) +public class Storage { + Extension extension; + //читаем днные аннотации + +}