Lines 43-48
Link Here
|
43 |
*/ |
43 |
*/ |
44 |
package org.openide.filesystems; |
44 |
package org.openide.filesystems; |
45 |
|
45 |
|
|
|
46 |
import java.lang.annotation.ElementType; |
47 |
import java.lang.annotation.Retention; |
48 |
import java.lang.annotation.RetentionPolicy; |
49 |
import java.lang.annotation.Target; |
46 |
import java.util.Collection; |
50 |
import java.util.Collection; |
47 |
import java.util.Map; |
51 |
import java.util.Map; |
48 |
import java.util.Set; |
52 |
import java.util.Set; |
Lines 178-181
Link Here
|
178 |
} |
182 |
} |
179 |
} |
183 |
} |
180 |
|
184 |
|
|
|
185 |
/** Declarative registration of a {@link MIMEResolver}. Allows simple |
186 |
* registration in the most common cases via annotations attributes and |
187 |
* complex registration by pointing to the rich XML definition. This |
188 |
* annotation is processed during compile time and generates effective |
189 |
* representation of the declaration in layer file. |
190 |
* @since 7.60 |
191 |
*/ |
192 |
@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE, ElementType.TYPE }) |
193 |
@Retention(RetentionPolicy.SOURCE) |
194 |
public static @interface Registration { |
195 |
/** The mime type this registration represents */ |
196 |
public String mimeType(); |
197 |
/** Extension(s) of a file to be recognized. */ |
198 |
public String[] extension(); |
199 |
/** Reference to detailed definition of the recognition rules. If this |
200 |
* attribute is specified, leave {@link #extension()} empty - e.g. assigned |
201 |
* to <code>{}</code>. |
202 |
* |
203 |
* @return relative path to the XML file describing registration for this mime type |
204 |
*/ |
205 |
public String definition() default ""; |
206 |
} |
181 |
} |
207 |
} |