申明一个字段是一个依赖注入的字段
@param type 字段的类型，一个Class
557159
function autowire({type: ModelType}) {
  return function (target) {
    const {key} = target
    const getter = function () {
      let tempo = this.tempo || (this.props && this.props.tempo)
      if(tempo){
        return tempo.diObjects[ModelType.namespace];
      } else {
        throw new Error('use autowire out of Controller of Model')
      }
    }
    getter.__ModelType = ModelType;

    target.key = '_'+key
    return {
      kind: 'method',
      key,
      placement: 'prototype',
      descriptor: {
        get:getter,
        configurable: true,
        enumerable: true,
      }
    }
  }
}
1341632
public void declearVar(Class<?> type,String varName,StringBuilder writesb,StringBuilder readsb,Type ...actTypes)
	{
		String varType=getVarTypeName(type, actTypes);
		//变量声明
		if(type.isPrimitive())
		{
			if(type.equals(boolean.class))
			{
				writesb.append("\t").append(varType+" "+varName+"=false;").append("\n");
			}else
			{
				writesb.append("\t").append(varType+" "+varName+"=0;").append("\n");
				readsb.append("\t").append(varType+" "+varName+"=0;").append("\n");
			}
		}else
		{
			writesb.append("\t").append(varType+" "+varName+"=null;").append("\n");
			readsb.append("\t").append(varType+" "+varName+"=null;").append("\n");
		}
	}
713775
public <T> TypeAdapter<T> getAdapter(Class<T> type) {
    return getAdapter(TypeToken.get(type));
  }
1265946
@SuppressWarnings("unchecked")
	public static <T> TypeInformation<T> createTypeInfo(Class<T> type) {
		return (TypeInformation<T>) createTypeInfo((Type) type);
	}
368118
public static <T> Class<T> wrap(Class<T> type) {
        if (type == null) {
            throw new IllegalArgumentException();
        }

        Class<T> wrapped = (Class<T>) PRIMITIVE_TO_WRAP.get(type);
        return (wrapped == null) ? type : wrapped;
    }
601185
public void setDataType(String type)  {
        addField(ConfigureNodeFields.type, FormField.Type.text_single);
        setAnswer(ConfigureNodeFields.type.getFieldName(), type);
    }
935159
public ClassReloadingStrategy preregistered(Class<?>... type) {
        Map<String, Class<?>> preregisteredTypes = new HashMap<String, Class<?>>(this.preregisteredTypes);
        for (Class<?> aType : type) {
            preregisteredTypes.put(TypeDescription.ForLoadedType.getName(aType), aType);
        }
        return new ClassReloadingStrategy(instrumentation, strategy, bootstrapInjection, preregisteredTypes);
    }
635683
private int calculateTypeId(Class<?> type) {
    if (type == null)
      throw new NullPointerException("type cannot be null");
    return hasher.hash32(type.getName());
  }
592186
public void setType(String type) {
	property.setType(type);
	setDynamicAttribute(null, KeyConstants._type, type);
    }
1231942
public static Type createClassType(final Type type, final Type declaringType0) {
        if (isClassType(type)) return type;
        if (type instanceof ParameterizedType) {  // e.g. Map<String, String>
            final ParameterizedType pt = (ParameterizedType) type;
            final Type[] paramTypes = pt.getActualTypeArguments();
            for (int i = 0; i < paramTypes.length; i++) {
                paramTypes[i] = createClassType(paramTypes[i], declaringType0);
            }
            return createParameterizedType(pt.getOwnerType(), pt.getRawType(), paramTypes);
        }
        Type declaringType = declaringType0;
        if (declaringType instanceof Class) {
            do {
                declaringType = ((Class) declaringType).getGenericSuperclass();
                if (declaringType == Object.class) return Object.class;
            } while (declaringType instanceof Class);
        }
        //存在通配符则declaringType 必须是 ParameterizedType
        if (!(declaringType instanceof ParameterizedType)) return Object.class;
        final ParameterizedType declaringPType = (ParameterizedType) declaringType;
        final Type[] virTypes = ((Class) declaringPType.getRawType()).getTypeParameters();
        final Type[] desTypes = declaringPType.getActualTypeArguments();
        if (type instanceof WildcardType) {   // e.g. <? extends Serializable>
            final WildcardType wt = (WildcardType) type;
            for (Type f : wt.getUpperBounds()) {
                for (int i = 0; i < virTypes.length; i++) {
                    if (virTypes[i].equals(f)) return desTypes.length <= i ? Object.class : desTypes[i];
                }
            }
        } else if (type instanceof TypeVariable) { // e.g.  <? extends E>
            for (int i = 0; i < virTypes.length; i++) {
                if (virTypes[i].equals(type)) return desTypes.length <= i ? Object.class : desTypes[i];
            }
        }
        return type;
    }
1090446
private void writeType(String type)
        throws IOException
    {
        flushIfFull();

        int len = type.length();
        if (len == 0) {
            throw new IllegalArgumentException("empty type is not allowed");
        }

        if (_typeRefs == null)
            _typeRefs = new HashMap<String, Integer>();

        Integer typeRefV = (Integer) _typeRefs.get(type);

        if (typeRefV != null) {
            int typeRef = typeRefV.intValue();

            writeInt(typeRef);
        }
        else {
            _typeRefs.put(type, Integer.valueOf(_typeRefs.size()));

            writeString(type);
        }
    }
611839
public <R> R getData(Class<R> type) {
        return GSON.fromJson(data, type);
    }
299988
public final static boolean isClassType(final Type type) {
        if (type instanceof Class) return true;
        if (type instanceof WildcardType) return false;
        if (type instanceof TypeVariable) return false;
        if (type instanceof GenericArrayType) return isClassType(((GenericArrayType) type).getGenericComponentType());
        if (!(type instanceof ParameterizedType)) return false; //只能是null了
        final ParameterizedType ptype = (ParameterizedType) type;
        if (ptype.getOwnerType() != null && !isClassType(ptype.getOwnerType())) return false;
        if (!isClassType(ptype.getRawType())) return false;
        for (Type t : ptype.getActualTypeArguments()) {
            if (!isClassType(t)) return false;
        }
        return true;
    }
609864
private String getTypeName(Type type)
    {
        String name;
        if (type instanceof Class) {
            name = ((Class<?>) type).getName();
        } else if (type instanceof ParameterizedType) {
            name = ((Class<?>) ((ParameterizedType) type).getRawType()).getName();
        } else {
            name = type.toString();
        }

        return name;
    }
647508
private void addSuperClass(Object object, Class<?> type)
    {
        for (final Class<?> types : type.getInterfaces())
        {
            addType(types, object);
        }
        final Class<?> parent = type.getSuperclass();
        if (parent != null)
        {
            addSuperClass(object, parent);
        }
    }
161519
public void setType(Type type) {
        Type actual = Type.preserveType(this.getType(), type);

        mConversions.clear();
        mExceptionPossible = false;
        if (actual != null) {
            // Prefer cast for initial type for correct operation of
            // setInitialType if a conversion needs to be inserted at the
            // beginning.
            mConversions.add(new Conversion(null, actual, true));
        }
    }
691707
public static Type resolveRefType(Type type) {
        if (type == null)
            return null;

        if (type instanceof RefType)
            return resolveRefType(((RefType) type).getRefType());
        else
            return type;
    }