Available Methods
- toMaybeFunctionType ( )
- isFunctionType ( )
- isUnknownType ( )
- isEquivalent ( )
- isSubtype ( )
- restrictByNotNullOrUndefined ( )
- isConstructor ( )
- isEmptyType ( )
- visit ( )
- isFunctionPrototypeType ( )
- isEnumElementType ( )
- matchesUint32Context ( )
- dereference ( )
- isStruct ( )
- autoboxesTo ( )
- matchesInt32Context ( )
- isInstanceType ( )
- isEnumType ( )
- toObjectType ( )
- isInterface ( )
- canBeCalled ( )
- canAssignTo ( )
- isEquivalentTo ( )
- matchesNumberContext ( )
- equals ( )
- isTemplateType ( )
- getGreatestSubtype ( )
- isDict ( )
- isUnionType ( )
- matchesStringContext ( )
- getLeastSupertype ( )
- resolve ( )
- isOrdinaryFunction ( )
- canTestForShallowEqualityWith ( )
- testForEquality ( )
- toMaybeEnumType ( )
- isNullType ( )
- hasProperty ( )
- isRecordType ( )
- isNoType ( )
- matchesObjectContext ( )
- isNumberValueType ( )
- isNamedType ( )
- getTemplateTypeMap ( )
- getRestrictedTypeGivenToBooleanOutcome ( )
- isArrayType ( )
- isTemplatizedType ( )
- autobox ( )
- isVoidType ( )
- getJSDocInfo ( )
- differsFrom ( )
- isAllType ( )
- findPropertyType ( )
Related Classes
- java.util.Collections
- java.util.Iterator
- java.util.Map.Entry
- java.util.LinkedHashSet
- com.google.common.collect.Lists
- java.util.function.Predicate
- com.google.common.collect.ImmutableList
- javax.annotation.Nullable
- com.google.common.collect.ImmutableMap
- com.google.common.collect.Maps
- com.google.common.collect.Sets
- java.util.Deque
- com.google.common.base.Preconditions
- com.google.common.collect.ImmutableSet
- com.google.common.base.Joiner
- com.google.common.collect.Iterables
- java.util.stream.StreamSupport
- junit.framework.Assert
- com.google.common.base.Function
- com.google.common.base.Predicate
- com.google.common.collect.Collections2
- javax.annotation.CheckReturnValue
- com.google.javascript.jscomp.SourceFile
- com.google.javascript.rhino.jstype.FunctionType
- com.google.javascript.rhino.jstype.ObjectType
Java Code Examples for com.google.javascript.rhino.jstype.JSType#isArrayType()
The following examples show how to use
com.google.javascript.rhino.jstype.JSType#isArrayType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClosureTypeRegistry.java From jsinterop-generator with Apache License 2.0 | 6 votes |
private TypeReference createMethodDefiningTypeReferenceFrom(TemplateType templateType) { JSType jsType = jsTypeByThisTemplateType.get(templateType); checkNotNull(jsType, "%s is not used a method receiver.", templateType); TypeReference typeReference = resolveTypeReference(jsType); List<TemplateType> templateKeys = (jsType instanceof ObjectType ? ((ObjectType) jsType).getConstructor() : jsType) .getTemplateTypeMap() .getTemplateKeys(); // Create a ParametrizedTypeReference if the replacing type has template type. The JSType // stored in the map is never a TemplatizedType because it's the type definition not a type // reference. if (templateKeys.isEmpty()) { return typeReference; } else if (jsType.isArrayType()) { checkState(templateKeys.size() == 1, templateKeys); return new ArrayTypeReference(resolveTypeReference(templateKeys.get(0))); } else { return createParametrizedTypeReference(jsType, templateKeys); } }
Example 2
Source File: TypeCollectionPass.java From js-dossier with Apache License 2.0 | 5 votes |
private static boolean isPrimitive(JSType type) { return !type.isEnumElementType() && (type.isBooleanValueType() || type.isBooleanObjectType() || type.isNumber() || type.isNumberValueType() || type.isNumberObjectType() || type.isString() || type.isStringObjectType() || type.isStringValueType() || type.isVoidType() || type.isArrayType()); }