2013-09-09 16:57:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.gecko.annotationProcessors;
|
|
|
|
|
|
|
|
/**
|
2013-11-22 00:41:28 +04:00
|
|
|
* Object holding annotation data. Used by GeneratableElementIterator.
|
2013-09-09 16:57:37 +04:00
|
|
|
*/
|
2013-11-22 00:41:28 +04:00
|
|
|
public class AnnotationInfo {
|
2013-09-09 16:57:37 +04:00
|
|
|
public final String wrapperName;
|
|
|
|
public final boolean isMultithreaded;
|
2014-01-18 09:32:25 +04:00
|
|
|
public final boolean noThrow;
|
2014-06-04 23:04:12 +04:00
|
|
|
public final boolean narrowChars;
|
2014-11-13 21:47:24 +03:00
|
|
|
public final boolean catchException;
|
2013-09-09 16:57:37 +04:00
|
|
|
|
2014-08-06 02:04:38 +04:00
|
|
|
public AnnotationInfo(String aWrapperName, boolean aIsMultithreaded,
|
2014-11-13 21:47:24 +03:00
|
|
|
boolean aNoThrow, boolean aNarrowChars, boolean aCatchException) {
|
2013-09-09 16:57:37 +04:00
|
|
|
wrapperName = aWrapperName;
|
|
|
|
isMultithreaded = aIsMultithreaded;
|
2014-01-18 09:32:25 +04:00
|
|
|
noThrow = aNoThrow;
|
2014-08-05 23:52:43 +04:00
|
|
|
narrowChars = aNarrowChars;
|
2014-11-13 21:47:24 +03:00
|
|
|
catchException = aCatchException;
|
|
|
|
|
2015-01-10 03:33:57 +03:00
|
|
|
if (noThrow && catchException) {
|
2014-11-13 21:47:24 +03:00
|
|
|
// It doesn't make sense to have these together
|
|
|
|
throw new IllegalArgumentException("noThrow and catchException are not allowed together");
|
|
|
|
}
|
2013-09-09 16:57:37 +04:00
|
|
|
}
|
|
|
|
}
|