public void setPeerType(JClassType type) { assert type.isParameterized() == null && type.isRawType() == null; toReturn.peerType = type; String packageName = type.getPackage().getName(); if (packageName.startsWith("java")) { packageName = "emul." + packageName; } toReturn.packageName = packageName; beanSimpleSourceName = type.getName().replace('.', '_') + "AutoBean"; } }
public void setPeerType(JClassType type) { assert type.isParameterized() == null && type.isRawType() == null; toReturn.peerType = type; String packageName = type.getPackage().getName(); if (packageName.startsWith("java")) { packageName = "emul." + packageName; } toReturn.packageName = packageName; beanSimpleSourceName = type.getName().replace('.', '_') + "AutoBean"; } }
public void setPeerType(JClassType type) { assert type.isParameterized() == null && type.isRawType() == null; toReturn.peerType = type; String packageName = type.getPackage().getName(); if (packageName.startsWith("java")) { packageName = "emul." + packageName; } toReturn.packageName = packageName; beanSimpleSourceName = type.getName().replace('.', '_') + "AutoBean"; } }
/** * Returns a simple qualified name for simple types, including classes and * interfaces, parameterized, and raw types. Null is returned for other types * such as arrays and type parameters (e.g., 'E' in java.util.List<E>) because * filtering is meaningless for such types. */ private String getBaseTypeName(JClassType type) { JClassType baseType = null; if (type instanceof JRealClassType) { baseType = type; } else if (type.isParameterized() != null) { baseType = type.isParameterized().getBaseType(); } else if (type.isRawType() != null) { baseType = type.isRawType(); } return baseType == null ? null : baseType.getQualifiedSourceName(); } }
/** * Returns a simple qualified name for simple types, including classes and * interfaces, parameterized, and raw types. Null is returned for other types * such as arrays and type parameters (e.g., 'E' in java.util.List<E>) because * filtering is meaningless for such types. */ private String getBaseTypeName(JClassType type) { JClassType baseType = null; if (type instanceof JRealClassType) { baseType = type; } else if (type.isParameterized() != null) { baseType = type.isParameterized().getBaseType(); } else if (type.isRawType() != null) { baseType = type.isRawType(); } return baseType == null ? null : baseType.getQualifiedSourceName(); } }
/** * Returns a simple types, including classes and * interfaces, parameterized, and raw types. Null is returned for other types * such as arrays and type parameters (e.g., 'E' in java.util.List<E>) because * filtering is meaningless for such types. */ protected String getBaseTypeName(JClassType type) { if(type == null){ return null; } if (type instanceof JRealClassType) { return type.getQualifiedSourceName(); } else if (type.isParameterized() != null) { return type.isParameterized().getBaseType().getQualifiedSourceName(); } else if (type.isRawType() != null) { return type.isRawType().getQualifiedSourceName(); } return type.getQualifiedSourceName(); }
@Override public MetaType[] getTypeParameters() { final List<MetaType> types = new ArrayList<>(); for (final JClassType parm : parameterizedType.getTypeArgs()) { if (parm.isWildcard() != null) { types.add(new GWTWildcardType(oracle, parm.isWildcard())); } else if (parm.isTypeParameter() != null) { types.add(new GWTTypeVariable(oracle, parm.isTypeParameter())); } else if (parm.isArray() != null && isInnerMostComponentTypeParameter(parm.isArray())) { // is generic array. Erase to Object[] types.add(GWTClass.newInstance(oracle, parm.isArray().getErasedType())); } else if (parm.isClassOrInterface() != null || parm.isEnum() != null || parm.isPrimitive() != null || parm.isRawType() != null || parm.isArray() != null || parm.isAnnotation() != null) { types.add(GWTClass.newInstance(oracle, parm)); } else { throw new IllegalArgumentException("Unsupported kind of type parameter " + parm + " in type " + parameterizedType.getName()); } } return types.toArray(new MetaType[types.size()]); }
@Override public MetaType[] getTypeParameters() { final List<MetaType> types = new ArrayList<>(); for (final JClassType parm : parameterizedType.getTypeArgs()) { if (parm.isWildcard() != null) { types.add(new GWTWildcardType(oracle, parm.isWildcard())); } else if (parm.isTypeParameter() != null) { types.add(new GWTTypeVariable(oracle, parm.isTypeParameter())); } else if (parm.isArray() != null && isInnerMostComponentTypeParameter(parm.isArray())) { // is generic array. Erase to Object[] types.add(GWTClass.newInstance(oracle, parm.isArray().getErasedType())); } else if (parm.isClassOrInterface() != null || parm.isEnum() != null || parm.isPrimitive() != null || parm.isRawType() != null || parm.isArray() != null || parm.isAnnotation() != null) { types.add(GWTClass.newInstance(oracle, parm)); } else { throw new IllegalArgumentException("Unsupported kind of type parameter " + parm + " in type " + parameterizedType.getName()); } } return types.toArray(new MetaType[types.size()]); }
if (getBaseType(candidate) == baseType && originalType.isRawType() == null) {
if (getBaseType(candidate) == baseType && originalType.isRawType() == null) {
if (classType.isRawType() != null) { localLogger .log(
if (classType.isRawType() != null) { localLogger .log(