获取带泛型的类型名称
@param type
@param actTypes
@return
773165
public String getVarTypeName(Class<?> type,Type ...actTypes)
	{
		String varType=getVarTypeName(type);
		if(actTypes!=null)
		{
			List<String> acts=new ArrayList<>();
			for(Type act:actTypes)
			{
				acts.add(act.getTypeName());
			}
			if(!acts.isEmpty())
			{
				if(acts.size()==1)
				{
					varType+="<"+acts.remove(0)+">";
				}else
				{
					varType+="<"+String.join(",", acts)+">";
				}
			}
		}
		varType=varType.replace('$','.');
		return varType;
	}
28373
public <T extends Action> T getAction(Class<T> type) {
        // Shortcut: if the persisted list has one, return it.
        for (Action a : getActions()) {
            if (type.isInstance(a)) {
                return type.cast(a);
            }
        }
        // Otherwise check transient factories.
        for (TransientActionFactory<?> taf : TransientActionFactory.factoriesFor(getClass(), type)) {
            for (Action a : createFor(taf)) {
                if (type.isInstance(a)) {
                    return type.cast(a);
                }
            }
        }
        return null;
    }
225170
protected <T> T _executeTx(
                    final String operation,
                    final Class<? extends Persistable<?>> type,
                    final TransactionCallback<T> action
                    )
    {
        return _executeTx( operation, type, null, action );
    }
577639
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, type);
    }
281610
public void setActionTypes(java.util.Collection<ActionType> actionTypes) {
        if (actionTypes == null) {
            this.actionTypes = null;
            return;
        }

        this.actionTypes = new java.util.ArrayList<ActionType>(actionTypes);
    }
713775
public <T> TypeAdapter<T> getAdapter(Class<T> type) {
    return getAdapter(TypeToken.get(type));
  }
849602
private String typeSig(Type type) {
        L2MSignatureGenerator sg = new L2MSignatureGenerator();
        sg.assembleSig(type);
        return sg.toString();
    }
831491
public void setType(Type type) {
		this.type = type;
		LOGGER.trace("Changed the Action Button type to: {}", getType());
		setSize(getType().getSize());
	}
223039
public CMISInfo getCMISInfo(final Class<? extends GraphObject> type) {

		try { return type.newInstance().getCMISInfo(); } catch (Throwable t) {}

		return null;
	}
690204
public static String[] getArgsTypeNameArray(Class<?>[] argsTypes) {
        String[] argsTypeArray = null;
        if (argsTypes != null) {
            argsTypeArray = new String[argsTypes.length];
            for (int i = 0; i < argsTypes.length; i++) {
                argsTypeArray[i] = argsTypes[i].getName();
            }
        }
        return argsTypeArray;
    }
552768
private static Type getActualType(Map<TypeVariable<?>, Type> map, Type type) {
    return TypeVisitor.of(type, b -> b
        .onClass(c -> c)
        .onTypeVariable(tv -> map.containsKey(tv) ? getActualType(map, map.get(tv)) : tv)
        .onParameterizedType(pt -> TypeVisitor.of(pt.getRawType(), bb -> bb
            .onClass(c -> createParameterizedType(c, pt.getOwnerType(),
                Arrays.stream(pt.getActualTypeArguments()).map(t -> getActualType(map, t)).toArray(Type[]::new)))
            .result()))
        .onWildcardType(wt -> createWildcardType(
            Arrays.stream(wt.getUpperBounds()).map(t -> getActualType(map, t)).toArray(Type[]::new),
            Arrays.stream(wt.getLowerBounds()).map(t -> getActualType(map, t)).toArray(Type[]::new)))
        .onGenericArrayType(gat -> createGenericArrayType(getActualType(map, gat.getGenericComponentType())))
        .result(type));
  }
297163
public static boolean methodParamsMatch(List<String> typeNames, Class<?>[] types)
    {
        if (typeNames.size() != types.length)
        {
            return false;
        }

        for (int i = 0; i < types.length; i++)
        {
            String typeName = typeNames.get(i);
            int typeNameEnd = typeName.length();

            Class<?> type = types[i];
            for (; type.isArray(); type = type.getComponentType())
            {
                if (typeNameEnd < 2 ||
                    typeName.charAt(--typeNameEnd) != ']' ||
                    typeName.charAt(--typeNameEnd) != '[')
                {
                    return false;
                }
            }

            if (!type.getName().regionMatches(0, typeName, 0, typeNameEnd))
            {
                return false;
            }
        }

        return true;
    }
1285540
public TypeSpec generateType(Type type) {
    AdapterConstant adapterConstant = profile.getAdapter(type.type());
    if (adapterConstant != null) {
      return generateAdapterForCustomType(type);
    }
    if (type instanceof MessageType) {
      //noinspection deprecation: Only deprecated as a public API.
      return generateMessage((MessageType) type);
    }
    if (type instanceof EnumType) {
      //noinspection deprecation: Only deprecated as a public API.
      return generateEnum((EnumType) type);
    }
    if (type instanceof EnclosingType) {
      return generateEnclosingType((EnclosingType) type);
    }
    throw new IllegalStateException("Unknown type: " + type);
  }
773203
public static String toReadableType(final String type) {
        final SignatureReader reader = new SignatureReader(type);
        final TraceSignatureVisitor visitor = new TraceSignatureVisitor(0);
        reader.acceptType(visitor);
        return visitor.getDeclaration();
    }
376945
public static IActionType<?> getType(String script) {
        for (IActionType<?> actionType : instance) {
            if (actionType.matches(script)) {
                return actionType;
            }
        }

        throw new IllegalArgumentException("Script type was not recognized: " + script);
    }
955891
public static String getNameWithTypeParameters(IType type) {
		assert type != null;
		final String superName = type.getFullyQualifiedName('.');
		if (!JavaModelUtil.is50OrHigher(type.getJavaProject())) {
			return superName;
		}
		try {
			final ITypeParameter[] typeParameters = type.getTypeParameters();
			if (typeParameters != null && typeParameters.length > 0) {
				final StringBuffer buf = new StringBuffer(superName);
				buf.append('<');
				for (int k = 0; k < typeParameters.length; ++k) {
					if (k != 0) {
						buf.append(',').append(' ');
					}
					buf.append(typeParameters[k].getElementName());
				}
				buf.append('>');
				return buf.toString();
			}
		} catch (JavaModelException e) {
			// ignore
		}
		return superName;

	}
567767
public static Type[] getActualTypeArguments(Type type) {
        Type resolvedType = Types.getCanonicalType(type);
        if (resolvedType instanceof ParameterizedType) {
            return ((ParameterizedType) resolvedType).getActualTypeArguments();
        } else {
            return EMPTY_TYPES;
        }
    }