public class JSTypeCreatorFromJSDoc extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JSTypeCreatorFromJSDoc.UnknownTypeException
Exception for when unrecognized type names are encountered
|
Constructor and Description |
---|
JSTypeCreatorFromJSDoc(CodingConvention convention) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<NominalType> |
getExtendedInterfaces(JSDocInfo jsdoc,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<String> typeParameters) |
FunctionTypeBuilder |
getFunctionType(JSDocInfo jsdoc,
Node declNode,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry)
Consumes either a "classic" function jsdoc with @param, @return, etc,
or a jsdoc with @type{function ...} and finds the types of the formal
parameters and the return value.
|
com.google.common.collect.ImmutableSet<NominalType> |
getImplementedInterfaces(JSDocInfo jsdoc,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<String> typeParameters) |
JSType |
getNodeTypeDeclaration(JSDocInfo jsdoc,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry) |
NominalType |
getNominalType(Node n,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<String> typeParameters) |
Map<Node,String> |
getUnknownTypesMap() |
Set<String> |
getWarnings() |
boolean |
hasKnownType(Node n,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<String> typeParameters) |
static boolean |
isRestArg(JSDocInfo funJsdoc,
String formalParamName) |
void |
resolveEnum(EnumType e,
DeclaredTypeRegistry registry) |
void |
resolveTypedef(Typedef td,
DeclaredTypeRegistry registry) |
public JSTypeCreatorFromJSDoc(CodingConvention convention)
public JSType getNodeTypeDeclaration(JSDocInfo jsdoc, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry)
public void resolveTypedef(Typedef td, DeclaredTypeRegistry registry)
public void resolveEnum(EnumType e, DeclaredTypeRegistry registry)
public boolean hasKnownType(Node n, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry, com.google.common.collect.ImmutableList<String> typeParameters)
public NominalType getNominalType(Node n, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry, com.google.common.collect.ImmutableList<String> typeParameters)
public com.google.common.collect.ImmutableSet<NominalType> getImplementedInterfaces(JSDocInfo jsdoc, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry, com.google.common.collect.ImmutableList<String> typeParameters)
public com.google.common.collect.ImmutableSet<NominalType> getExtendedInterfaces(JSDocInfo jsdoc, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry, com.google.common.collect.ImmutableList<String> typeParameters)
public FunctionTypeBuilder getFunctionType(JSDocInfo jsdoc, Node declNode, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry)
Copyright © 2009–2014 Google. All rights reserved.