当前位置: 首页>>代码示例>>Java>>正文


Java JType.isClass方法代码示例

本文整理汇总了Java中com.google.gwt.core.ext.typeinfo.JType.isClass方法的典型用法代码示例。如果您正苦于以下问题:Java JType.isClass方法的具体用法?Java JType.isClass怎么用?Java JType.isClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.core.ext.typeinfo.JType的用法示例。


在下文中一共展示了JType.isClass方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isJsType

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
boolean isJsType( JType type )
{
	JClassType cType = type.isClass();
	if( cType == null )
		cType = type.isInterface();
	if( cType == null )
		return false;

	Annotation[] annotations = cType.getDeclaredAnnotations();
	for( Annotation annotation : annotations )
	{
		if( "jsinterop.annotations.JsType".equals( annotation.annotationType().getName() ) )
			return true;
	}

	return false;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:18,代码来源:ServiceGenerator.java

示例2: isValideType

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
private boolean isValideType(JType type){
  if(type == null)
    return false;

  if(type.isInterface() != null)
    return false;

  if(type.isPrimitive() != null)
    return true;

  JClassType aClass = type.isClass();
  if(aClass != null && (aClass.isAssignableTo(serializableIntf) || aClass.isAssignableTo(isSerializableIntf))){
    return true;
  }

  JArrayType array = type.isArray();
  if(array == null) return false;
  return isValideType(array.getComponentType());
}
 
开发者ID:seanchenxi,项目名称:gwt-storage,代码行数:20,代码来源:StorageKeyProviderModel.java

示例3: filter

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
protected Set<JType> filter(final Set<JType> types, final Set<JClassType> uediInterfaces) {
    final Set<JType> filteredTypes = new HashSet<JType>();
    for (JType jType : types) {
        jType = jType.getErasedType();
        final JClassType classType = jType.isClass();
        if (isAssignableFromAny(uediInterfaces, classType)) {
            filteredTypes.add(classType);
        }
    }
    return filteredTypes;
}
 
开发者ID:czyzby,项目名称:uedi,代码行数:12,代码来源:ReflectionPoolGenerator.java

示例4: isJSOType

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
boolean isJSOType( JType type )
{
	JClassType cType = type.isClass();
	if( cType == null )
		cType = type.isInterface();
	if( cType == null )
		return false;

	for( JClassType t = cType; t != null; t = t.getSuperclass() )
	{
		sw.println( "// supertype : " + t.getSimpleSourceName() );
		JTypeParameter typeParam = t.isTypeParameter();
		if( typeParam != null )
		{
			sw.println( "// which is a type parameter" );
			JClassType[] bounds = typeParam.getBounds();
			for( int b = 0; b < bounds.length; b++ )
			{
				sw.println( "// which is bound to : " + bounds[b].getSimpleSourceName() );
				if( bounds[b].getSimpleSourceName().compareTo( "JavaScriptObject" ) == 0 )
					return true;
			}
		}

		if( t.getSimpleSourceName().compareTo( "JavaScriptObject" ) == 0 )
			return true;
	}

	return false;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:31,代码来源:ServiceGenerator.java

示例5: isJSOType

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
boolean isJSOType( JType type )
{
	JClassType cType = type.isClass();
	if( cType == null )
		cType = type.isInterface();
	if( cType == null )
		return false;

	for( JClassType t = cType; t != null; t = t.getSuperclass() )
	{
		// sw.println( "// supertype : " + t.getSimpleSourceName() );
		JTypeParameter typeParam = t.isTypeParameter();
		if( typeParam != null )
		{
			// sw.println( "// which is a type parameter" );
			JClassType[] bounds = typeParam.getBounds();
			for( int b = 0; b < bounds.length; b++ )
			{
				// sw.println( "// which is bound to : " +
				// bounds[b].getSimpleSourceName() );
				if( bounds[b].getSimpleSourceName().compareTo( "JavaScriptObject" ) == 0 )
					return true;
			}
		}
		if( t.getSimpleSourceName().compareTo( "JavaScriptObject" ) == 0 )
			return true;
	}

	return false;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:31,代码来源:DataProxyGenerator.java

示例6: addMappers

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * Parse the configured serializer/deserializer configuration and put them into the corresponding map
 *
 * @param configuration configuration
 * @param mapperType type of the mapper
 * @param allSupportedSerializationClassBuilder builder aggregating all the types that have a serializer
 * @param allSupportedDeserializationClassBuilder builder aggregating all the types that have a deserializer
 */
private void addMappers( final AbstractConfiguration configuration, final MapperType mapperType, Builder<JClassType>
        allSupportedSerializationClassBuilder, Builder<JClassType> allSupportedDeserializationClassBuilder ) throws
        UnableToCompleteException {
    Map<Class, Class> configuredMapper = mapperType.getMapperTypeConfiguration( configuration );

    for ( Entry<Class, Class> entry : configuredMapper.entrySet() ) {

        JType mappedType = findType( entry.getKey() );
        if ( null == mappedType ) {
            continue;
        }

        JClassType mapperClassType = findClassType( entry.getValue() );
        if ( null == mapperClassType ) {
            continue;
        }

        if ( mapperType.isKey() ) {
            MapperInstance keyMapperInstance = getKeyInstance( mappedType, mapperClassType, mapperType.isSerializer() );
            if ( mapperType.isSerializer() ) {
                keySerializers.put( mappedType.getQualifiedSourceName(), keyMapperInstance );
            } else {
                keyDeserializers.put( mappedType.getQualifiedSourceName(), keyMapperInstance );
            }
        } else {
            MapperInstance mapperInstance = getInstance( mappedType, mapperClassType, mapperType.isSerializer() );
            if ( null != mapperInstance ) {
                if ( mapperType.isSerializer() ) {
                    serializers.put( mappedType.getQualifiedSourceName(), mapperInstance );
                    if ( null != mappedType.isClass() ) {
                        allSupportedSerializationClassBuilder.add( mappedType.isClass() );
                    }
                } else {
                    deserializers.put( mappedType.getQualifiedSourceName(), mapperInstance );
                    if ( null != mappedType.isClass() ) {
                        allSupportedDeserializationClassBuilder.add( mappedType.isClass() );
                    }
                }
            }
        }
    }
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:51,代码来源:RebindConfiguration.java

示例7: isObject

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isObject</p>
 *
 * @param type the type to test
 * @return true if the type is {@link Object}, false otherwise
 */
public static boolean isObject( JType type ) {
    return null != type.isClass() && Object.class.getName().equals( type.getQualifiedSourceName() );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:CreatorUtils.java

示例8: isKeySerializer

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isKeySerializer</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isKeySerializer( JType type ) {
    return null != type.isClass() && type.isClass().isAssignableTo( keySerializerType );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:JacksonTypeOracle.java

示例9: isKeyDeserializer

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isKeyDeserializer</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isKeyDeserializer( JType type ) {
    return null != type.isClass() && type.isClass().isAssignableTo( keyDeserializerType );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:JacksonTypeOracle.java

示例10: isJsonSerializer

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isJsonSerializer</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isJsonSerializer( JType type ) {
    return null != type.isClass() && type.isClass().isAssignableTo( jsonSerializerType );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:JacksonTypeOracle.java

示例11: isJsonDeserializer

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isJsonDeserializer</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isJsonDeserializer( JType type ) {
    return null != type.isClass() && type.isClass().isAssignableTo( jsonDeserializerType );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:JacksonTypeOracle.java

示例12: isJavaScriptObject

import com.google.gwt.core.ext.typeinfo.JType; //导入方法依赖的package包/类
/**
 * <p>isJavaScriptObject</p>
 *
 * @param type a {@link com.google.gwt.core.ext.typeinfo.JType} object.
 * @return a boolean.
 */
public boolean isJavaScriptObject( JType type ) {
    return null != type.isClass() && type.isClass().isAssignableTo( jsoType );
}
 
开发者ID:nmorel,项目名称:gwt-jackson,代码行数:10,代码来源:JacksonTypeOracle.java


注:本文中的com.google.gwt.core.ext.typeinfo.JType.isClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。