Created
May 23, 2017 14:55
-
-
Save fermopili/2cd8ab9892e6f6e56d25f3c72011878a to your computer and use it in GitHub Desktop.
com.javarush.task.task38.task3811 Тикеты
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task38.task3811; | |
/* | |
Тикеты | |
*/ | |
@Ticket ( | |
priority = Ticket.Priority.HIGH, | |
createdBy = "Noodles", | |
tags = {"bug","fix asap"} | |
) | |
public class Solution { | |
public static void main(String[] args) { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task38.task3811; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
/** | |
* Created by Administrator on 23.05.2017. | |
*/ | |
@Retention(value= RetentionPolicy.RUNTIME ) | |
@Target(ElementType.TYPE) | |
public @interface Ticket | |
{ | |
public enum Priority | |
{ | |
LOW, | |
MEDIUM, | |
HIGH | |
} | |
Priority priority() default Priority.MEDIUM; | |
String createdBy() default "Amigo"; | |
String[] tags() default {}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
taskKey="com.javarush.task.task38.task3811" | |
Тикеты | |
Реализуй в отдельном файле аннотацию Ticket. | |
Требования к ней следующие: | |
1) Должна быть доступна во время выполнения программы. | |
2) Применяться может только к новым типам данных. | |
3) Должна содержать enum Priority c элементами LOW, MEDIUM, HIGH. | |
4) Приоритет будет задавать свойство priority - по умолчанию Priority.MEDIUM. | |
5) Свойство tags будет массивом строк и будет хранить теги связанные с тикетом. | |
6) Свойство createdBy будет строкой - по умолчанию Amigo. | |
Требования: | |
1. Аннотация Ticket должна быть доступна во время выполнения программы. | |
2. Аннотация Ticket должна применяться только к новым типам данных. | |
3. Аннотация Ticket должна содержать enum Priority c элементами LOW, MEDIUM, HIGH. | |
4. Аннотация Ticket должна содержать свойство priority - по умолчанию Priority.MEDIUM. | |
5. Аннотация Ticket должна содержать свойство tags - массив строк, пустой по умолчанию. | |
6. Аннотация Ticket должна содержать свойство createdBy - строку, равную "Amigo" по умолчанию. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment