本文整理汇总了Java中com.google.javascript.rhino.jstype.JSType.isRecordType方法的典型用法代码示例。如果您正苦于以下问题:Java JSType.isRecordType方法的具体用法?Java JSType.isRecordType怎么用?Java JSType.isRecordType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.javascript.rhino.jstype.JSType
的用法示例。
在下文中一共展示了JSType.isRecordType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: acceptTypedef
import com.google.javascript.rhino.jstype.JSType; //导入方法依赖的package包/类
private void acceptTypedef(StaticTypedSlot<JSType> typedef) {
// The type linked to symbol is not the type represented in the @typedef annotations.
JSType realType = checkNotNull(getJsTypeRegistry().getType(typedef.getName()));
if (realType.isRecordType()) {
acceptRecordType(toRecordType(realType), typedef.getName());
} else if (isAnonymousFunctionType(realType)) {
acceptFunctionType(toFunctionType(realType), typedef.getName());
} else {
// we are in a case where typedef is used as an alias and doesnt define any RecordType or
// FunctionType.
// ex: /** @typedef {string|number} */ var StringOrNumber;
// The JsCompiler have already inlined all typedefs at call site, so we don't need to visit
// the typedef definition.
return;
}
}
开发者ID:google,项目名称:jsinterop-generator,代码行数:18,代码来源:AbstractClosureVisitor.java示例2: acceptType
import com.google.javascript.rhino.jstype.JSType; //导入方法依赖的package包/类
private void acceptType(JSType type) {
type = type.restrictByNotNullOrUndefined();
if (type.isRecordType()) {
acceptRecordType(toRecordType(type), null);
} else if (isAnonymousFunctionType(type)) {
acceptFunctionType(toFunctionType(type), null);
} else if (type.isTemplatizedType()) {
type.toMaybeTemplatizedType().getTemplateTypes().forEach(this::acceptType);
} else if (type.isUnionType()) {
type.toMaybeUnionType().getAlternates().forEach(this::acceptType);
}
}
开发者ID:google,项目名称:jsinterop-generator,代码行数:14,代码来源:AbstractClosureVisitor.java示例3: pushCurrentJavaType
import com.google.javascript.rhino.jstype.JSType; //导入方法依赖的package包/类
@Override
protected void pushCurrentJavaType(JSType jsType) {
if (jsType.isRecordType() || isAnonymousFunctionType(jsType)) {
// We are collecting these types and there is no java type associated to them yet.
// after creation, the visitor will push the type by calling
// pushCurrentJavaType(Type javaType)
return;
}
super.pushCurrentJavaType(jsType);
}
开发者ID:google,项目名称:jsinterop-generator,代码行数:12,代码来源:AnonymousTypeCollector.java本文标签属性:
示例:示例英文
代码:代码零九
java:java面试题
JSType:JSType
isRecordType:isRecordType