@atomist/rug
Version:
TypeScript model for Atomist Rugs, see http://docs.atomist.com/
34 lines (33 loc) • 1.3 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var PathExpression_1 = require("../../tree/PathExpression");
/**
* Match a particular exception.
*/
var Catch = (function (_super) {
__extends(Catch, _super);
function Catch(exception) {
return _super.call(this, "//JavaFile()//catchClause//catchType[@value='" + exception + "']") || this;
}
return Catch;
}(PathExpression_1.PathExpression));
exports.Catch = Catch;
exports.CatchException = new Catch("Exception");
function annotatedClass(typeName) {
return "normalClassDeclaration" + withAnnotation(typeName);
}
exports.annotatedClass = annotatedClass;
function withAnnotation(typeName) {
return "[/*/annotation//typeName[@value='" + typeName + "']]";
}
exports.withAnnotation = withAnnotation;