2013-09-09 05:57:37 -07: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-21 12:41:28 -08:00
|
|
|
* Object holding annotation data. Used by GeneratableElementIterator.
|
2013-09-09 05:57:37 -07:00
|
|
|
*/
|
2013-11-21 12:41:28 -08:00
|
|
|
public class AnnotationInfo {
|
2013-09-09 05:57:37 -07:00
|
|
|
public final String wrapperName;
|
|
|
|
public final boolean isMultithreaded;
|
2014-01-17 21:32:25 -08:00
|
|
|
public final boolean noThrow;
|
2014-06-04 12:04:12 -07:00
|
|
|
public final boolean narrowChars;
|
2014-11-13 10:47:24 -08:00
|
|
|
public final boolean catchException;
|
2013-09-09 05:57:37 -07:00
|
|
|
|
2014-08-05 15:04:38 -07:00
|
|
|
public AnnotationInfo(String aWrapperName, boolean aIsMultithreaded,
|
2014-11-13 10:47:24 -08:00
|
|
|
boolean aNoThrow, boolean aNarrowChars, boolean aCatchException) {
|
2013-09-09 05:57:37 -07:00
|
|
|
wrapperName = aWrapperName;
|
|
|
|
isMultithreaded = aIsMultithreaded;
|
2014-01-17 21:32:25 -08:00
|
|
|
noThrow = aNoThrow;
|
2014-08-05 12:52:43 -07:00
|
|
|
narrowChars = aNarrowChars;
|
2014-11-13 10:47:24 -08:00
|
|
|
catchException = aCatchException;
|
|
|
|
|
2015-01-09 16:33:57 -08:00
|
|
|
if (noThrow && catchException) {
|
2014-11-13 10:47:24 -08:00
|
|
|
// It doesn't make sense to have these together
|
|
|
|
throw new IllegalArgumentException("noThrow and catchException are not allowed together");
|
|
|
|
}
|
2013-09-09 05:57:37 -07:00
|
|
|
}
|
|
|
|
}
|