本文整理汇总了TypeScript中angular2/src/reflection/reflection.Reflector.setter方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Reflector.setter方法的具体用法?TypeScript Reflector.setter怎么用?TypeScript Reflector.setter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/src/reflection/reflection.Reflector
的用法示例。
在下文中一共展示了Reflector.setter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: parseAccessMemberOrMethodCall
parseAccessMemberOrMethodCall(receiver, isSafe: boolean = false): AST {
let id = this.expectIdentifierOrKeyword();
if (this.optionalCharacter($LPAREN)) {
let args = this.parseCallArguments();
this.expectCharacter($RPAREN);
let fn = this.reflector.method(id);
return isSafe ? new SafeMethodCall(receiver, id, fn, args) :
new MethodCall(receiver, id, fn, args);
} else {
let getter = this.reflector.getter(id);
let setter = this.reflector.setter(id);
return isSafe ? new SafeAccessMember(receiver, id, getter, setter) :
new AccessMember(receiver, id, getter, setter);
}
}
示例2: parseAccessMemberOrMethodCall
parseAccessMemberOrMethodCall(receiver): AST {
var id = this.expectIdentifierOrKeyword();
if (this.optionalCharacter($LPAREN)) {
var args = this.parseCallArguments();
this.expectCharacter($RPAREN);
var fn = this.reflector.method(id);
return new MethodCall(receiver, id, fn, args);
} else {
var getter = this.reflector.getter(id);
var setter = this.reflector.setter(id);
var am = new AccessMember(receiver, id, getter, setter);
if (this.optionalOperator("|")) {
return this.parseInlinedPipe(am);
} else {
return am;
}
}
}