esoe 2 years ago
parent
commit
41aa33521b
  1. 14
      files/src/main/docs/diagrams/src/Files.puml
  2. 1
      files/src/main/java/ru/molokoin/Extension.java
  3. 15
      files/src/main/java/ru/molokoin/File.java
  4. 8
      files/src/main/java/ru/molokoin/Format.java
  5. 7
      files/src/main/java/ru/molokoin/Storage.java

14
files/src/main/docs/diagrams/src/Files.puml

@ -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
files/src/main/java/ru/molokoin/Extension.java

@ -4,5 +4,4 @@ public enum Extension {
AUDIO, AUDIO,
VIDEO, VIDEO,
OTHER; OTHER;
} }

15
files/src/main/java/ru/molokoin/File.java

@ -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;
} }

8
files/src/main/java/ru/molokoin/Format.java

@ -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;
}

7
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;
//читаем днные аннотации
}
Loading…
Cancel
Save