package com.github.fhtw.swp.tutorium.decorator;

import com.github.fhtw.swp.tutorium.Factory;
import com.github.fhtw.swp.tutorium.NullFactory;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines a decorator of the decorater pattern.
 *
 * @see Component
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Decorator {

    /**
     * Defines a factory class that if specified is used to construct instances of the annotated class.
     *
     * @return The factory class
     * @see Factory
     */
    Class<? extends Factory> factory() default NullFactory.class;
}

@@ -46,103 +46,8 @@
 r;%0A%0A
-import com.github.fhtw.swp.tutorium.Factory;%0Aimport com.github.fhtw.swp.tutorium.NullFactory;%0A%0A
 impo
@@ -245,17 +245,17 @@
  decorat
-e
+o
 r patter
@@ -402,229 +402,108 @@
 nes 
-a factory class that if specified is used to construct instances of the annotated class.%0A     *%0A     * @return The factory class%0A     * @see Factory%0A     */%0A    Class%3C? extends Factory%3E factory() default NullFactory.class
+the decorated class of this decorator. Also referred to as %22Component%22.%0A     */%0A    Class%3C?%3E value()
 ;%0A%7D%0A

remove factory attribute and add component type attribute