public class JSTypeCreatorFromJSDoc extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JSTypeCreatorFromJSDoc.UnknownTypeException
Exception for when unrecognized type names are encountered
|
Modifier and Type | Field and Description |
---|---|
static DiagnosticType |
BAD_JSDOC_ANNOTATION |
static DiagnosticType |
CONFLICTING_EXTENDED_TYPE |
static DiagnosticType |
CONFLICTING_IMPLEMENTED_TYPE |
static DiagnosticType |
CONFLICTING_SHAPE_TYPE |
static DiagnosticType |
DICT_IMPLEMENTS_INTERF |
static DiagnosticType |
EXTENDS_NON_OBJECT |
static DiagnosticType |
EXTENDS_NOT_ON_CTOR_OR_INTERF |
static DiagnosticType |
IMPLEMENTS_WITHOUT_CONSTRUCTOR |
static DiagnosticType |
INHERITANCE_CYCLE |
static DiagnosticType |
INVALID_GENERICS_INSTANTIATION |
Constructor and Description |
---|
JSTypeCreatorFromJSDoc(CodingConvention convention) |
Modifier and Type | Method and Description |
---|---|
DeclaredFunctionType |
getFunctionType(JSDocInfo jsdoc,
String functionName,
Node declNode,
NominalType.RawNominalType constructorType,
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.
|
JSType |
getNodeTypeDeclaration(JSDocInfo jsdoc,
NominalType.RawNominalType ownerType,
DeclaredTypeRegistry registry) |
Map<Node,String> |
getUnknownTypesMap() |
Set<JSError> |
getWarnings() |
static boolean |
isRestArg(JSDocInfo funJsdoc,
String formalParamName) |
void |
resolveEnum(EnumType e,
DeclaredTypeRegistry registry) |
void |
resolveTypedef(Typedef td,
DeclaredTypeRegistry registry) |
public static final DiagnosticType INVALID_GENERICS_INSTANTIATION
public static final DiagnosticType BAD_JSDOC_ANNOTATION
public static final DiagnosticType EXTENDS_NON_OBJECT
public static final DiagnosticType EXTENDS_NOT_ON_CTOR_OR_INTERF
public static final DiagnosticType INHERITANCE_CYCLE
public static final DiagnosticType DICT_IMPLEMENTS_INTERF
public static final DiagnosticType IMPLEMENTS_WITHOUT_CONSTRUCTOR
public static final DiagnosticType CONFLICTING_SHAPE_TYPE
public static final DiagnosticType CONFLICTING_EXTENDED_TYPE
public static final DiagnosticType CONFLICTING_IMPLEMENTED_TYPE
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 DeclaredFunctionType getFunctionType(JSDocInfo jsdoc, String functionName, Node declNode, NominalType.RawNominalType constructorType, NominalType.RawNominalType ownerType, DeclaredTypeRegistry registry)
Copyright © 2009–2017 Google. All rights reserved.