samples/componentinjection/anagram-modular/src-api-compiletimecaches/org/apidesign/anagram/impl/annotations/WordsImpl.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 20 Jun 2009 16:06:19 +0200
changeset 336 219810ff3c72
permissions -rw-r--r--
Example of "compile time caches" and their possible usage in Component Injection area
jtulach@336
     1
/*
jtulach@336
     2
 * To change this template, choose Tools | Templates
jtulach@336
     3
 * and open the template in the editor.
jtulach@336
     4
 */
jtulach@336
     5
jtulach@336
     6
package org.apidesign.anagram.impl.annotations;
jtulach@336
     7
jtulach@336
     8
import java.util.Map;
jtulach@336
     9
import org.apidesign.anagram.api.WordLibrary;
jtulach@336
    10
jtulach@336
    11
/**
jtulach@336
    12
 *
jtulach@336
    13
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jtulach@336
    14
 */
jtulach@336
    15
// BEGIN: anagram.api.WordsImpl
jtulach@336
    16
public class WordsImpl implements WordLibrary {
jtulach@336
    17
    private Map<String,Object> map;
jtulach@336
    18
jtulach@336
    19
    private WordsImpl(Map<String,Object> m) {
jtulach@336
    20
        this.map = m;
jtulach@336
    21
    }
jtulach@336
    22
jtulach@336
    23
    public static WordsImpl create(Map attributes) {
jtulach@336
    24
        return new WordsImpl(attributes);
jtulach@336
    25
    }
jtulach@336
    26
jtulach@336
    27
    public String[] getWords() {
jtulach@336
    28
        return (String[])map.get("words"); // NOI18N
jtulach@336
    29
    }
jtulach@336
    30
}
jtulach@336
    31
// END: anagram.api.WordsImpl