Architecture that extends types using extension methods
Abstract
Architecture that extends existing types including constructed and sealed types using extension methods. Extension methods are static methods that can be invoked using instance method syntax. Extension methods are declared by specifying the keyword “this” as a modifier on the first parameter of the methods. Extension methods have all the capabilities of regular static methods. In addition, once imported, extension methods can be invoked using instance method syntax. Also disclosed are rules for importing extension methods, and extension method invocations. Extension methods are imported through using-namespace-directives. In addition to importing the types contained in a namespace, a using-namespace-directive imports all extension methods in all static classes in the namespace. In effect, imported extension methods appear as additional methods on the types that are given by their first parameter and have lower precedence than regular instance methods.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 0.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method of extending data model and operations without needing to modify existing codes, the method comprising: statically processing invocation of an extension method of a static type by treating the extension method as a normal instance method rather than as a method having declaration syntax; determining that static processing invocation of the extension method includes an instance method and, as a result, rewriting the instance method with at least one identifier followed by an expression; and processing the rewritten instance method as a static method invocation, exc
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- "mysql-fetch-rom", Jun. 2001, PHP Group.
- "SQL Tutorial", Jun. 2003.
- Abelson, et al., Structure and Interpretation of Computer Programs. The Rules of Evaluation [online], Cambridge, MA: The MIT Press, 1996, 3 pages. http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%-toc-%-sec-3.2.1.
- Ahmed, Syed Mujeeb, Jack Melnich, Neelam Singh, and Tim Smith. Pro*C/C++ Precompiler Programmer's Guide, Release 9.2. Copyright © 1996, 2002 Oracle Corporation. Part No. A97269-01.
- Antoniol, et al. "Tracing Object-Oriented Code into Functional Requirements", 2000, IEEE, p. 1-8.