Returns the Java type of the abstract adapter class generated for a corresponding {@code
protoType}. Returns null if {@code protoType} is not using a custom proto adapter.
184749
public @Nullable ClassName abstractAdapterName(ProtoType protoType) {
    TypeName profileJavaName = profile.getTarget(protoType);
    if (profileJavaName == null) return null;

    ClassName javaName = nameToJavaName.get(protoType);
    Type type = schema.getType(protoType);
    return type instanceof EnumType
        ? javaName.peerClass(javaName.simpleName() + "Adapter")
        : javaName.peerClass("Abstract" + javaName.simpleName() + "Adapter");
  }
1101897
public com.google.javascript.jscomp.Requirement.Type getType() {
    com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_);
    return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result;
  }
195869
public Type getGenericParameterType() {
        if (this.genericParameterType == null) {
            if (this.parameterIndex < 0) {
                this.genericParameterType = (this.method != null ? this.method.getGenericReturnType() : null);
            } else {
                this.genericParameterType = (this.method != null ? this.method.getGenericParameterTypes()[this.parameterIndex]
                        : this.constructor.getGenericParameterTypes()[this.parameterIndex]);
            }
        }
        return this.genericParameterType;
    }
1093596
@SuppressWarnings("unchecked")
    private static <T> Class<T> getGenericType(Class<?> thisClass)
    {
        Type type = thisClass;
        do
        {
            type = ((Class<?>)type).getGenericSuperclass();
            if (type instanceof ParameterizedType)
            {
                return (Class<T>)((ParameterizedType)type).getActualTypeArguments()[0];
            }
        }
        while (type instanceof Class<?> && !type.equals(AbstractFormatter.class));

        return (Class<T>)Object.class;
    }
248105
@Nullable
  private static ObjectType getSuperClassInstanceIfFinal(@Nullable JSType type) {
    if (type == null) {
      return null;
    }

    ObjectType obj = type.toObjectType();
    FunctionType ctor = (obj == null) ? null : obj.getSuperClassConstructor();
    JSDocInfo doc = (ctor == null) ? null : ctor.getJSDocInfo();
    if (doc != null && doc.isFinal()) {
      return ctor.getInstanceType();
    }

    return null;
  }
1179848
protected static <AdapterType> AdapterType getAdapter(ResourceHandle resourceHandle, Class<AdapterType> type) {
        if (type == ResourceHandle.class) {
            return type.cast(resourceHandle);
        }
        log.info("Unable to adapt resource on {} to type {}", resourceHandle.getPath(), type.getName());
        return null;
    }
850082
public Class<?> getClassType() {

        if (m_type == null) {
            return String.class;
        }
        try {
            return Class.forName(m_type);
        } catch (ClassNotFoundException e) {
            return String.class;
        }
    }
1136089
@Trivial
    private static Type getType(Converter<?> converter) {
        Type type = null;

        Type[] itypes = converter.getClass().getGenericInterfaces();
        for (Type itype : itypes) {
            ParameterizedType ptype = (ParameterizedType) itype;
            if (ptype.getRawType() == Converter.class) {
                Type[] atypes = ptype.getActualTypeArguments();
                if (atypes.length == 1) {
                    type = atypes[0];
                    break;
                } else {
                    throw new ConfigException(Tr.formatMessage(tc, "unable.to.determine.conversion.type.CWMCG0009E", converter.getClass().getName()));
                }
            }
        }
        if (type == null) {
            throw new ConfigException(Tr.formatMessage(tc, "unable.to.determine.conversion.type.CWMCG0009E", converter.getClass().getName()));
        }

        return type;
    }
1190985
private static Class checkClass(ProtoFile protoFile, TypeElement type, Map<String, String> mappedUniName,
            boolean isUniName) {
        String packageName = protoFile.packageName();
        String defaultClsName = type.name();
        // to check if has "java_package" option and "java_outer_classname"
        List<OptionElement> options = protoFile.options();
        if (options != null) {
            for (OptionElement option : options) {
                if (option.name().equals(JAVA_PACKAGE_OPTION)) {
                    packageName = option.value().toString();
                } else if (option.name().equals(JAVA_OUTER_CLASSNAME_OPTION)) {
                    defaultClsName = option.value().toString();
                }
            }
        }

        String simpleName = getProxyClassName(defaultClsName, mappedUniName, isUniName);
        String className = packageName + PACKAGE_SPLIT_CHAR + simpleName;

        Class<?> c = null;
        try {
            c = Class.forName(className);
        } catch (ClassNotFoundException e1) {
            // if class not found so should generate a new java source class.
            c = null;
        }

        return c;
    }
854627
@Override
	public JvmType getType() {
		if (this.type == null) {
//			// make sure scoping has taken place and installed an IJvmTypeProvider
//			if (returnType != null)
//				returnType.getType();
			JvmType newType = TypesFactory.eINSTANCE.createJvmVoid();
			((InternalEObject)newType).eSetProxyURI(computeTypeUri(isProcedure()));
			type = (JvmType) eResolveProxy((InternalEObject) newType);
		}
		return super.getType();
	}
1323088
function getPrototype(value) {
    let prototype;

    if (!_.isUndefined(value) && !_.isNull(value)) {
        if (!_.isObject(value)) {
            prototype = value.constructor.prototype;
        }
        else if (_.isFunction(value)) {
            prototype = value.prototype;
        }
        else {
            prototype = Object.getPrototypeOf(value);
        }
    }

    return prototype;
}
1276898
public static Class getTypeClass(Type type)
    {
        Class typeClassClass = null;

        if (type instanceof Class) {
            typeClassClass = (Class) type;
        } else if (type instanceof ParameterizedType) {
            typeClassClass = (Class) ((ParameterizedType) type).getRawType();
        } else if (type instanceof GenericArrayType) {
            Class<?> arrrayParameter = getTypeClass(((GenericArrayType) type).getGenericComponentType());
            if (arrrayParameter != null) {
                typeClassClass = Array.newInstance(arrrayParameter, 0).getClass();
            }
        }

        return typeClassClass;
    }
68626
public ClassName generatedTypeName(Type type) {
    ClassName abstractAdapterName = abstractAdapterName(type.type());
    return abstractAdapterName != null
        ? abstractAdapterName
        : (ClassName) typeName(type.type());
  }
933675
@SuppressWarnings("unckecked")
    public static Class<?> getRawType(Type type) {
        if (type instanceof Class<?>) {
            // type is a normal class.
            return (Class<?>) type;

        } else if (type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) type;

            // I'm not exactly sure why getRawType() returns Type instead of Class.
            // Neal isn't either but suspects some pathological case related
            // to nested classes exists.
            Type rawType = parameterizedType.getRawType();
            checkArgument(rawType instanceof Class,
                    "Expected a Class, but <%s> is of type %s", type, type.getClass().getName());
            //noinspection ConstantConditions
            return (Class<?>) rawType;

        } else if (type instanceof GenericArrayType) {
            Type componentType = ((GenericArrayType) type).getGenericComponentType();
            return Array.newInstance(getRawType(componentType), 0).getClass();

        } else if (type instanceof TypeVariable) {
            // we could use the variable's bounds, but that'll won't work if there are multiple.
            // having a raw type that's more general than necessary is okay
            return Object.class;

        } else {
            throw new IllegalArgumentException("Expected a Class, ParameterizedType, or "
                    + "GenericArrayType, but <" + type + "> is of type " + type.getClass().getName());
        }
    }
922029
@SuppressWarnings("unchecked")
    private ClassesTransformer<T> getTyped(ClassesTransformer<? extends T> classesTransformer) {
        return (ClassesTransformer<T>) classesTransformer;
    }
1189269
public static IPlatformAdapter getInstance() {
        if (svInstance != null) {
            return svInstance;
        }

        synchronized (PlatformAdapterAccessor.class) {
            if (svInstance != null) {
                // need to check again in case one thread waited on sync block while
                // another
                // initialized the instance
                return svInstance;
            }
            String adapterClassName = null;
            try {
                adapterClassName = AccessController.doPrivileged(new PrivilegedExceptionAction<String>()
                {
                    @Override
                    public String run() throws Exception
                {
                    return System.getProperty(ADAPTER_NAME_PROP);
                }
                });

                if (adapterClassName != null) {
                    // The loaded class must be an instanceof IPlatformAdapter - if not,
                    // the following
                    // line will throw a ClassCastException indicating that the specified
                    // value of the
                    // adapterName property was not a class that implemented
                    // IPlatformAdapter.
                    // This should be a very rare occurrence.
                    Class<? extends IPlatformAdapter> clazz = (Class<? extends IPlatformAdapter>) Class.forName(adapterClassName);
                    svInstance = clazz.newInstance();
                } else {
                    // Expected on Sun/Hybrid/Java 6 VMs
                    svInstance = new DefaultPlatformAdapter();
                }
            } catch (Throwable t) {
                // this means we are in a Harmony Java 7 VM, but are unable to
                // initialize
                // the Harmony platform adapter - this is a fatal error to most WAS
                // processes - must log FFDC and error message, and throw an exception
                // TODO: NLS-ize
                Tr.error(tc, "<Need new error message> - Failed to initialize {0}", new Object[] { adapterClassName });
                // Alex Ffdc.log(t, PlatformAdapterAccessor.class, CLASSNAME, "46");
                // throw new
                // IllegalStateException("Unable to initialize VM PlatformAdapter: " +
                // adapterClassName, t);
                // in this case, we need to use the default adapter -- but expect
                // erroneous behavior...
                svInstance = new DefaultPlatformAdapter();
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "chosen adapter is: " + svInstance.getClass().getName());
        }

        return svInstance;
    }
195214
@Override
    public Type getType() {
        ParameterizedType type = (ParameterizedType) field.getGenericType();
        if (type.getActualTypeArguments()[0] instanceof ParameterizedType) {
            ParameterizedType first = (ParameterizedType) type.getActualTypeArguments()[0];
            return first.getRawType();
        } else {
            return type.getActualTypeArguments()[0];
        }
    }