| 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 | |
| 5 | package org.mozilla.javascript.annotations; |
| 6 | |
| 7 | import java.lang.annotation.*; |
| 8 | |
| 9 | /** |
| 10 | * An annotation that marks a Java method as JavaScript constructor. This can |
| 11 | * be used as an alternative to the <code>jsConstructor</code> naming convention desribed in |
| 12 | * {@link org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)}. |
| 13 | */ |
| 14 | @Documented |
| 15 | @Retention(RetentionPolicy.RUNTIME) |
| 16 | @Target({ElementType.CONSTRUCTOR, ElementType.METHOD}) |
| 17 | public @interface JSConstructor { |
| 18 | } |