Java Code Examples for com.google.gwt.core.ext.typeinfo.JType#isEnum()

The following examples show how to use com.google.gwt.core.ext.typeinfo.JType#isEnum() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModelCreator.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void createSubModels(TreeLogger logger, GeneratorContext context) {
	for (JType jType : this.imports) {
		if (jType == null) {
			continue;
		}
		if (jType.isEnum() != null) {
			continue;
		}
		if (ModelCreator.DISCARD_MODEL_TYPES.contains(jType.getQualifiedSourceName())) {
			continue;
		}
		if (jType instanceof JClassType) {
			ModelCreator creator = new ModelCreator((JClassType) jType);
			String subModelType = creator.create(logger, context);
			this.subModels.put(jType, subModelType);
		}
	}
}
 
Example 2
Source File: JacksonTypeOracle.java    From gwt-jackson with Apache License 2.0 2 votes vote down vote up
/**
 * <p>isEnum</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isEnum( JType type ) {
    return null != type.isEnum();
}