List of usage examples for com.google.gwt.dev.asm Type OBJECT
int OBJECT
To view the source code for com.google.gwt.dev.asm Type OBJECT.
Click Source Link
From source file:com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.java
License:Apache License
private List<Type> getSupertypes(ErrorContext logger, Type type) { if (type.getSort() != Type.OBJECT) { return Collections.emptyList(); }//from w w w . j ava 2 s . c o m List<Type> toReturn = supertypes.get(type); if (toReturn != null) { return toReturn; } logger = logger.setType(type); toReturn = new SupertypeCollector(logger).exec(type); supertypes.put(type, Collections.unmodifiableList(toReturn)); return toReturn; }
From source file:com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.java
License:Apache License
private boolean isValueType(ErrorContext logger, Type type) { if (type.getSort() != Type.OBJECT) { return true; }//from w w w.j a v a 2 s. c o m if (valueTypes.contains(type)) { return true; } logger = logger.setType(type); if (isAssignable(logger, enumType, type)) { return true; } return false; }
From source file:com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.java
License:Apache License
private Type maybeBoxType(Type maybePrimitive) { if (maybePrimitive.getSort() == Type.OBJECT) { return maybePrimitive; }//from w ww .j a v a 2 s .c o m return getBoxedType(maybePrimitive); }
From source file:com.google.web.bindery.requestfactory.server.RequestFactoryJarExtractor.java
License:Apache License
/** * Process a type, possibly returning a rebased type. * //w ww. j a v a 2 s . c o m * @param sourceType TODO */ private Type processType(String sourceType, Type type) { Type toReturn; synchronized (seen) { toReturn = seen.get(type); if (toReturn != null) { return toReturn; } toReturn = Type.getType(type.getDescriptor()); seen.put(type, toReturn); } int sort = type.getSort(); if (sort != Type.OBJECT && sort != Type.ARRAY) { return toReturn; } if (sort == Type.ARRAY) { processType(sourceType, type.getElementType()); return toReturn; } assert type.getInternalName().charAt(0) != 'L'; if (type.getInternalName().startsWith("java/") || type.getInternalName().startsWith("javax/")) { return toReturn; } if (VERBOSE) { System.out.println(sourceType + " -> " + type.getClassName()); } Future<State> future = ex.submit(new ProcessOneType(type)); inProcess.add(future); return toReturn; }
From source file:com.google.web.bindery.requestfactory.server.ResolverServiceLayer.java
License:Apache License
private Class<?> getClass(Type type) { switch (type.getSort()) { case Type.BOOLEAN: return boolean.class; case Type.BYTE: return byte.class; case Type.CHAR: return char.class; case Type.DOUBLE: return double.class; case Type.FLOAT: return float.class; case Type.INT: return int.class; case Type.LONG: return long.class; case Type.OBJECT: return forName(type.getClassName()); case Type.SHORT: return short.class; case Type.VOID: return void.class; case Type.ARRAY: return die(null, "Unsupported Type used in operation descriptor %s", type.getDescriptor()); default:/*from ww w. jav a2 s . co m*/ // Error in this switch statement return die(null, "Unhandled Type: %s", type.getDescriptor()); } }