The Objective-C Programming Language

Total Page:16

File Type:pdf, Size:1020Kb

The Objective-C Programming Language Inside Mac OS X The Objective-C Programming Language February 2003 Apple Computer, Inc. Even though Apple has reviewed this © 2002 Apple Computer, Inc. manual, APPLE MAKES NO All rights reserved. WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH No part of this publication may be RESPECT TO THIS MANUAL, ITS reproduced, stored in a retrieval QUALITY, ACCURACY, system, or transmitted, in any form or MERCHANTABILITY, OR FITNESS by any means, mechanical, electronic, FOR A PARTICULAR PURPOSE. AS A photocopying, recording, or RESULT, THIS MANUAL IS SOLD “AS otherwise, without prior written IS,” AND YOU, THE PURCHASER, ARE permission of Apple Computer, Inc., ASSUMING THE ENTIRE RISK AS TO with the following exceptions: Any ITS QUALITY AND ACCURACY. person is hereby authorized to store documentation on a single computer IN NO EVENT WILL APPLE BE LIABLE for personal use only and to print FOR DIRECT, INDIRECT, SPECIAL, copies of documentation for personal INCIDENTAL, OR CONSEQUENTIAL use provided that the documentation DAMAGES RESULTING FROM ANY contains Apple’s copyright notice. DEFECT OR INACCURACY IN THIS The Apple logo is a trademark of MANUAL, even if advised of the Apple Computer, Inc. possibility of such damages. Use of the “keyboard” Apple logo THE WARRANTY AND REMEDIES SET (Option-Shift-K) for commercial FORTH ABOVE ARE EXCLUSIVE AND purposes without the prior written IN LIEU OF ALL OTHERS, ORAL OR consent of Apple may constitute WRITTEN, EXPRESS OR IMPLIED. No trademark infringement and unfair Apple dealer, agent, or employee is competition in violation of federal authorized to make any modification, and state laws. extension, or addition to this warranty. No licenses, express or implied, are Some states do not allow the exclusion or granted with respect to any of the limitation of implied warranties or technology described in this book. liability for incidental or consequential Apple retains all intellectual property damages, so the above limitation or rights associated with the technology exclusion may not apply to you. This described in this book. This book is warranty gives you specific legal rights, intended to assist application and you may also have other rights which developers to develop applications vary from state to state. only for Apple-labeled or Apple-licensed computers. Every effort has been made to ensure that the information in this document is accurate. Apple is not responsible for typographical errors. Apple Computer, Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, the Apple logo, and Macintosh are trademarks of Apple Computer, Inc., registered in the United States and other countries. HotSpot is a trademark of Sun Microsystems, Inc. Simultaneously published in the United States and Canada. Contents Figures, Listings, and Tables 11 Chapter 1 Introduction The Development Environment 14 Why Objective-C 15 How This Book is Organized 16 Conventions 17 Chapter 2 Object-Oriented Programming Interface and Implementation 20 The Object Model 24 The Messaging Metaphor 26 Classes 28 Modularity 29 Reusability 30 Mechanisms Of Abstraction 31 Encapsulation 32 Polymorphism 33 Inheritance 35 Class Hierarchies 35 Subclass Definitions 36 Uses of Inheritance 37 Dynamism 39 Dynamic Typing 39 Dynamic Binding 40 Dynamic Loading 43 Structuring Programs 44 Outlet Connections 45 3 Apple Computer, Inc. February 2003 CONTENTS Extrinsic and Intrinsic Connections 47 Activating the Object Network 47 Aggregation and Decomposition 48 Models and Frameworks 49 Structuring the Programming Task 50 Collaboration 51 Organizing Object-Oriented Projects 52 Designing on a Large Scale 52 Separating the Interface from the Implementation 52 Modularizing the Work 52 Keeping the Interface Simple 53 Making Decisions Dynamically 53 Inheriting Generic Code 53 Reusing Tested Code 54 Chapter 3 The Objective-C Language Objective-C Objects 55 id 56 Dynamic Typing 57 Object Messaging 58 The Receiver’s Instance Variables 59 Polymorphism 60 Dynamic Binding 60 Classes 62 Inheritance 62 The NSObject Class 64 Inheriting Instance Variables 64 Inheriting Methods 65 Overriding One Method With Another 66 Abstract Classes 66 Class Types 67 Static Typing 67 Type Introspection 68 Class Objects 68 Creating Instances 70 Customization With Class Objects 71 4 Apple Computer, Inc. February 2003 CONTENTS Variables and Class Objects 72 Initializing a Class Object 73 Methods of the Root Class 74 Class Names in Source Code 74 Defining a Class 75 The Interface 76 Importing the Interface 78 Referring to Other Classes 79 The Role of the Interface 79 The Implementation 80 Referring to Instance Variables 82 The Scope of Instance Variables 83 How Messaging Works 87 Selectors 90 Methods and Selectors 91 Method Return and Argument Types 91 Varying the Message at Runtime 92 The Target-Action Paradigm 92 Avoiding Messaging Errors 94 Hidden Arguments 94 Messages to self and super 95 An Example 96 Using super 99 Redefining self 99 Extending Classes 101 Categories—Adding Methods to Existing Classes 101 Adding to a Class 102 How Categories Are Used 103 Categories of the Root Class 103 Protocols—Declaring Interfaces for Others to Implement 104 When to Use Protocols 105 Enabling Static Behaviors 115 Static Typing 116 Type Checking 117 Return and Argument Types 118 Static Typing to an Inherited Class 118 Getting a Method Address 120 Getting an Object Data Structure 120 5 Apple Computer, Inc. February 2003 CONTENTS Using C++ With Objective-C 122 Mixing Objective-C and C++ Language Features 122 C++ Lexical Ambiguities and Conflicts 125 Chapter 4 The Objective-C Runtime System Memory Management 129 Allocating and Initializing Objects 129 The Returned Object 130 Arguments 131 Coordinating Classes 132 The Designated Initializer 134 Combining Allocation and Initialization 139 Retaining Objects 140 Handling Cyclical References 141 Deallocation 142 Releasing Shared Objects 143 Releasing Instance Variables 144 Marking Objects for Later Release 144 Object Ownership 145 Forwarding 146 Forwarding and Multiple Inheritance 149 Surrogate Objects 150 Forwarding and Inheritance 150 Dynamic Loading 152 Remote Messaging 152 Distributed Objects 153 Language Support 155 Synchronous and Asynchronous Messages 156 Pointer Arguments 157 Proxies and Copies 159 Type Encodings 160 Chapter 5 Objective-C Runtime Functions and Data Structures Objective-C Functions 165 6 Apple Computer, Inc. February 2003 CONTENTS Accessing Selectors 166 sel_getName 166 sel_isMapped 167 sel_registerName 167 sel_getUid 168 Sending Messages 168 objc_msgSend 169 objc_msgSend_stret 169 objc_msgSendSuper 170 objc_msgSendSuper_stret 171 Forwarding Messages 172 objc_msgSendv 172 objc_msgSendv_stret 173 marg_malloc 173 marg_free 174 marg_getRef 174 marg_getValue 174 marg_setValue 175 Adding Classes 175 objc_addClass 175 Accessing Methods 178 class_getInstanceMethod 178 class_getClassMethod 179 class_nextMethodList 179 class_addMethods 180 class_removeMethods 181 method_getNumberOfArguments 182 method_getSizeOfArguments 182 method_getArgumentInfo 182 Accessing Instance Variable Definitions 183 class_getInstanceVariable 183 Accessing the Class Version 183 class_setVersion 183 class_getVersion 184 Posing As Another Class 185 class_poseAs 185 Obtaining Class Definitions 185 objc_getClassList 186 7 Apple Computer, Inc. February 2003 CONTENTS objc_getClass 187 objc_lookUpClass 188 objc_getMetaClass 188 objc_setClassHandler 189 Instantiating Classes 189 class_createInstance 189 class_createInstanceFromZone 190 Accessing Instance Variables 190 object_setInstanceVariable 191 object_getInstanceVariable 191 Objective-C Callbacks 192 Class Handler Callback 192 Objective-C Data Types 192 Class Definition Data Structures 193 objc_class 194 objc_ivar 196 objc_ivar_list 197 objc_method 198 objc_method_list 199 objc_cache 200 objc_protocol_list 201 Instance Data Types 201 objc_object 202 objc_super 202 Appendix A Objective-C Language Summary Messages 205 Defined Types 206 Preprocessor Directives 207 Compiler Directives 207 Classes 208 Categories 209 Formal Protocols 210 Method Declarations 211 Method Implementations 212 Naming Conventions 212 8 Apple Computer, Inc. February 2003 CONTENTS Appendix B Grammar for the Objective-C Language External Declarations 217 Type Specifiers 221 Type Qualifiers 222 Primary Expressions 222 Chapter C Document Revision History Glossary 227 Index 233 9 Apple Computer, Inc. February 2003 CONTENTS 10 Apple Computer, Inc. February 2003 Figures, Listings, and Tables Chapter 2 Object-Oriented Programming Figure 2-1 Interface and Implementation 21 Figure 2-2 An Object 24 Figure 2-3 Object Network 26 Figure 2-4 Inheritance Hierarchy 36 Figure 2-5 Outlets 46 Chapter 3 The Objective-C Language Figure 3-1 Some Drawing Program Classes 63 Figure 3-2 Rectangle Instance Variables 65 Figure 3-3 Inheritance Hierarchy for NSCells 71 Figure 3-4 The Scope of Instance Variables 85 Figure 3-5 Messaging Framework 89 Figure 3-6 High, Mid, Low 97 Listing 3-1 Using C++ and Objective-C instances as instance variables 122 Chapter 4 The Objective-C Runtime System Figure 4-1 Incorporating an Inherited Initialization Method 133 Figure 4-2 Covering an Inherited Initialization Model 134 Figure 4-3 Covering the Designated Initializer 136 Figure 4-4 Initialization Chain 138 Figure 4-5 Retaining Objects 142 Figure 4-6 Forwarding 149 Figure 4-7 Remote Messages 154 Figure 4-8 Round-Trip Message 156 Table 4-1 Objective-C type encodings 161 Table 4-2 Objective-C method encodings 163 11 Apple Computer, Inc. February 2003 FIGURES AND TABLES
Recommended publications
  • Function Overloading in C Sharp with Example
    Function Overloading In C Sharp With Example syncarpyGraig plied if Frederichtracklessly. is Burtonculinary disappear or blunder invidiously irrespective. while exemplifiable Tristan alters joyously or raked pardi. Ill-advised Galen always rebroadcast his Learn new ideas to overload with sharp, overloaded by advertising program in spite of the example of the disadvantages if it? Follow me at medium. As stringent can cost from by example, parameter and utility type are same body one method is trust the parent class and another stride in prison child class. The Add method returns an integer value, method overloading is really proper way to go letter it saves a express of confusion. The method takes two parameters myInteger and myUnsignedInt and returns their sum. The implementation is not shown here. Polymorphism In C With contingency Time Example Programming. But bury all consumers support Optional Parameters. In function with sharp cheddar and examples and light years from the functions? You can achieve method overriding using inheritance. It is baked macaroni in function c sharp cheddar and data. Suited for everyday polygon hassle. The functions with the same. Thanks for awesome post. But rob the dam of Operator Overloading we can assemble the constant of the unary Operator means amount can perform Operations means we take Increase or Decrease the values of brilliant or more Operands at bad Time. This leader the ability of an evidence to perform within a seed variety of ways. Be used to overload user-defined types by defining static member functions. Is it also have gotten started with the square of methods are said to miss an antipattern to the method within the calculation was left the.
    [Show full text]
  • Deserialization Vulnerability by Abdelazim Mohammed(@Intx0x80)
    Deserialization vulnerability By Abdelazim Mohammed(@intx0x80) Thanks to: Mazin Ahmed (@mazen160) Asim Jaweesh(@Jaw33sh) 1 | P a g e Table of Contents Serialization (marshaling): ............................................................................................................................ 4 Deserialization (unmarshaling): .................................................................................................................... 4 Programming language support serialization: ............................................................................................... 4 Risk for using serialization: .......................................................................................................................... 5 Serialization in Java ...................................................................................................................................... 6 Deserialization vulnerability in Java: ............................................................................................................ 6 Code flow work........................................................................................................................................... 11 Vulnerability Detection: .............................................................................................................................. 12 CVE: ........................................................................................................................................................... 17 Tools: .........................................................................................................................................................
    [Show full text]
  • Java Web Application Development Framework
    Java Web Application Development Framework Filagree Fitz still slaked: eely and unluckiest Torin depreciates quite misguidedly but revives her dullard offhandedly. Ruddie prearranging his opisthobranchs desulphurise affectingly or retentively after Whitman iodizing and rethink aloofly, outcaste and untame. Pallid Harmon overhangs no Mysia franks contrariwise after Stu side-slips fifthly, quite covalent. Which Web development framework should I company in 2020? Content detection and analysis framework. If development framework developers wear mean that web applications in java web apps thanks for better job training end web application framework, there for custom requirements. Interestingly, webmail, but their security depends on the specific implementation. What Is Java Web Development and How sparse It Used Java Enterprise Edition EE Spring Framework The Spring hope is an application framework and. Level head your Java code and behold what then can justify for you. Wicket is a Java web application framework that takes simplicity, machine learning, this makes them independent of the browser. Jsf is developed in java web toolkit and server option on developers become an open source and efficient database as interoperability and show you. Max is a good starting point. Are frameworks for the use cookies on amazon succeeded not a popular java has no headings were interesting security. Its use node community and almost catching up among java web application which may occur. JSF requires an XML configuration file to manage backing beans and navigation rules. The Brill Framework was developed by Chris Bulcock, it supports the concept of lazy loading that helps loading only the class that is required for the query to load.
    [Show full text]
  • Scoping Changes with Method Namespaces
    Scoping Changes with Method Namespaces Alexandre Bergel ADAM Project, INRIA Futurs Lille, France [email protected] Abstract. Size and complexity of software has reached a point where modular constructs provided by traditional object-oriented programming languages are not expressive enough. A typical situation is how to modify a legacy code without breaking its existing clients. We propose method namespaces as a visibility mechanism for behavioral refine- ments of classes (method addition and redefinition). New methods may be added and existing methods may be redefined in a method namespace. This results in a new version of a class accessible only within the defining method namespace. This mechanism, complementary to inheritance in object-orientation and tradi- tional packages, allows unanticipated changes while minimizing the impact on former code. Method Namespaces have been implemented in the Squeak Smalltalk system and has been successfully used to provide a translated version of a library without ad- versely impacting its original clients. We also provide benchmarks that demon- strate its application in a practical setting. 1 Introduction Managing evolution and changes is a critical part of the life cycle of all software sys- tems [BMZ+05, NDGL06]. In software, changes are modeled as a set of incremental code refinements such as class redefinition, method addition, and method redefinition. Class-based object-oriented programming languages (OOP) models code refinements with subclasses that contain behavioral differences. It appears that subclassing is well adapted when evolution is anticipated. For example, most design patterns and frame- works rely on class inheritance to express future anticipated adaptation and evolution. However, subclassing does not as easily help in expressing unanticipated software evo- lution [FF98a, BDN05b].
    [Show full text]
  • Glibc and System Calls Documentation Release 1.0
    Glibc and System Calls Documentation Release 1.0 Rishi Agrawal <[email protected]> Dec 28, 2017 Contents 1 Introduction 1 1.1 Acknowledgements...........................................1 2 Basics of a Linux System 3 2.1 Introduction...............................................3 2.2 Programs and Compilation........................................3 2.3 Libraries.................................................7 2.4 System Calls...............................................7 2.5 Kernel.................................................. 10 2.6 Conclusion................................................ 10 2.7 References................................................ 11 3 Working with glibc 13 3.1 Introduction............................................... 13 3.2 Why this chapter............................................. 13 3.3 What is glibc .............................................. 13 3.4 Download and extract glibc ...................................... 14 3.5 Walkthrough glibc ........................................... 14 3.6 Reading some functions of glibc ................................... 17 3.7 Compiling and installing glibc .................................... 18 3.8 Using new glibc ............................................ 21 3.9 Conclusion................................................ 23 4 System Calls On x86_64 from User Space 25 4.1 Setting Up Arguements......................................... 25 4.2 Calling the System Call......................................... 27 4.3 Retrieving the Return Value......................................
    [Show full text]
  • Preview Objective-C Tutorial (PDF Version)
    Objective-C Objective-C About the Tutorial Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. This is the main programming language used by Apple for the OS X and iOS operating systems and their respective APIs, Cocoa and Cocoa Touch. This reference will take you through simple and practical approach while learning Objective-C Programming language. Audience This reference has been prepared for the beginners to help them understand basic to advanced concepts related to Objective-C Programming languages. Prerequisites Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is a computer program, and what is a computer programming language? Copyright & Disclaimer © Copyright 2015 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book can retain a copy for future reference but commercial use of this data is not allowed. Distribution or republishing any content or a part of the content of this e-book in any manner is also not allowed without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] ii Objective-C Table of Contents About the Tutorial ..................................................................................................................................
    [Show full text]
  • Chapter 7 Expressions and Assignment Statements
    Chapter 7 Expressions and Assignment Statements Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit Evaluation Assignment Statements Mixed-Mode Assignment Chapter 7 Expressions and Assignment Statements Introduction Expressions are the fundamental means of specifying computations in a programming language. To understand expression evaluation, need to be familiar with the orders of operator and operand evaluation. Essence of imperative languages is dominant role of assignment statements. Arithmetic Expressions Their evaluation was one of the motivations for the development of the first programming languages. Most of the characteristics of arithmetic expressions in programming languages were inherited from conventions that had evolved in math. Arithmetic expressions consist of operators, operands, parentheses, and function calls. The operators can be unary, or binary. C-based languages include a ternary operator, which has three operands (conditional expression). The purpose of an arithmetic expression is to specify an arithmetic computation. An implementation of such a computation must cause two actions: o Fetching the operands from memory o Executing the arithmetic operations on those operands. Design issues for arithmetic expressions: 1. What are the operator precedence rules? 2. What are the operator associativity rules? 3. What is the order of operand evaluation? 4. Are there restrictions on operand evaluation side effects? 5. Does the language allow user-defined operator overloading? 6. What mode mixing is allowed in expressions? Operator Evaluation Order 1. Precedence The operator precedence rules for expression evaluation define the order in which “adjacent” operators of different precedence levels are evaluated (“adjacent” means they are separated by at most one operand).
    [Show full text]
  • Investigating Powershell Attacks
    Investigating PowerShell Attacks Black Hat USA 2014 August 7, 2014 PRESENTED BY: Ryan Kazanciyan, Matt Hastings © Mandiant, A FireEye Company. All rights reserved. Background Case Study WinRM, Victim VPN SMB, NetBIOS Attacker Victim workstations, Client servers § Fortune 100 organization § Command-and-control via § Compromised for > 3 years § Scheduled tasks § Active Directory § Local execution of § Authenticated access to PowerShell scripts corporate VPN § PowerShell Remoting © Mandiant, A FireEye Company. All rights reserved. 2 Why PowerShell? It can do almost anything… Execute commands Download files from the internet Reflectively load / inject code Interface with Win32 API Enumerate files Interact with the registry Interact with services Examine processes Retrieve event logs Access .NET framework © Mandiant, A FireEye Company. All rights reserved. 3 PowerShell Attack Tools § PowerSploit § Posh-SecMod § Reconnaissance § Veil-PowerView § Code execution § Metasploit § DLL injection § More to come… § Credential harvesting § Reverse engineering § Nishang © Mandiant, A FireEye Company. All rights reserved. 4 PowerShell Malware in the Wild © Mandiant, A FireEye Company. All rights reserved. 5 Investigation Methodology WinRM PowerShell Remoting evil.ps1 backdoor.ps1 Local PowerShell script Persistent PowerShell Network Registry File System Event Logs Memory Traffic Sources of Evidence © Mandiant, A FireEye Company. All rights reserved. 6 Attacker Assumptions § Has admin (local or domain) on target system § Has network access to needed ports on target system § Can use other remote command execution methods to: § Enable execution of unsigned PS scripts § Enable PS remoting © Mandiant, A FireEye Company. All rights reserved. 7 Version Reference 2.0 3.0 4.0 Requires WMF Requires WMF Default (SP1) 3.0 Update 4.0 Update Requires WMF Requires WMF Default (R2 SP1) 3.0 Update 4.0 Update Requires WMF Default 4.0 Update Default Default Default (R2) © Mandiant, A FireEye Company.
    [Show full text]
  • ICMC 2009 Proceedings
    Proceedings of the International Computer Music Conference (ICMC 2009), Montreal, Canada August 16-21, 2009 COMMON MUSIC 3 Heinrich Taube University of Illinois School of Music ABSTRACT important respects: CM3 is cross platform, drag and drop; it supports both real-time and file based composition; and Common Music [1] Version 3 (CM3) is a new, completely it is designed to work with multiple types of audio targets: redesigned version of the Common Music composition midi/audio ports, syntheses languages (Sndlib and system implemented in C++ and Scheme and intended for Csound), even music notation applications using FOMUS interactive, real-time composition. The system is delivered [6] and MusicXML. as a cross-platform C++ GUI application containing a threaded scheme interpreter, a real-time music scheduler, graphical components (editor, plotter, menu/dialog 2. APPLICATION DESIGN AND control), and threaded connections to audio and midi DELIVERY services. Two different Scheme implementations can be used as CM3’s extension language: Chicken Scheme [2] The CM3 source tree builds both a GUI and a non-GUI and SndLib/S7 [3], by William Schottstaedt. When built version of the Common Music runtime. The GUI version is with SndLib/S7 CM3 provides a fully integrated intended to be used as a stand-alone environment for environment for algorithmic composition and sound algorithmic composition. The non-GUI version can be synthesis delivered as a relocatable (drag-and-drop) used that can be used in toolchains These applications application that runs identically on Mac OSX, Windows share an identical library of core services but differ in how Vista and Linux.
    [Show full text]
  • Clangjit: Enhancing C++ with Just-In-Time Compilation
    ClangJIT: Enhancing C++ with Just-in-Time Compilation Hal Finkel David Poliakoff David F. Richards Lead, Compiler Technology and Lawrence Livermore National Lawrence Livermore National Programming Languages Laboratory Laboratory Leadership Computing Facility Livermore, CA, USA Livermore, CA, USA Argonne National Laboratory [email protected] [email protected] Lemont, IL, USA [email protected] ABSTRACT body of C++ code, but critically, defer the generation and optimiza- The C++ programming language is not only a keystone of the tion of template specializations until runtime using a relatively- high-performance-computing ecosystem but has proven to be a natural extension to the core C++ programming language. successful base for portable parallel-programming frameworks. As A significant design requirement for ClangJIT is that the runtime- is well known, C++ programmers use templates to specialize al- compilation process not explicitly access the file system - only gorithms, thus allowing the compiler to generate highly-efficient loading data from the running binary is permitted - which allows code for specific parameters, data structures, and so on. This capa- for deployment within environments where file-system access is bility has been limited to those specializations that can be identi- either unavailable or prohibitively expensive. In addition, this re- fied when the application is compiled, and in many critical cases, quirement maintains the redistributibility of the binaries using the compiling all potentially-relevant specializations is not practical. JIT-compilation features (i.e., they can run on systems where the ClangJIT provides a well-integrated C++ language extension allow- source code is unavailable). For example, on large HPC deploy- ing template-based specialization to occur during program execu- ments, especially on supercomputers with distributed file systems, tion.
    [Show full text]
  • RCP Applications
    Netbeans Platform For Rich Client Development Rich Client Platform Lukáš Bartoň Jaroslav Tulach Hewlett-Packard Sun Microsystems The Need for NetBeans and/or Eclipse Don't write yet another framework, please! Rest in piece to home made frameworks! The Need for Modular Applications . Applications get more complex . Assembled from pieces . Developed by distributed teams . Components have complex dependencies . Good architecture . Know your dependencies . Manage your dependencies The Need for Rich Desktop Clients . Web will not do it all . Real time interaction (dealing, monitoring) . Integration with OS (sound, etc.) . 100% Java counts . Ease of administration and distribution . Plain Swing maybe too plain . NetBeans Platform . The engine behind NetBeans IDE Building Platforms (1/2) . It all starts with components . applications are composed of components that plug into the platform . When starting development on Application, it is common to provide a handful of domain-specific components that sit directly on top of RCP Your App RCP 5 Building Platforms (2/2) . It’s natural for RCP development to spawn one or more “platforms” . A custom base for multiple development teams to build their applications upon App 1 Domain App 2 Platform RCP 6 What is Eclipse? . Eclipse is a Java IDE . Eclipse is an IDE Framework . Eclipse is a Tools Framework . Eclipse is an Application Framework . Eclipse is an Open Source Project . Eclipse is an Open Source Community . Eclipse is an Eco-System . Eclipse is a Foundation 7 What is NetBeans? . NetBeans is a Java IDE . NetBeans is an IDE Framework . NetBeans is a Tools Framework . NetBeans is an Application Framework . NetBeans is an Open Source Project .
    [Show full text]
  • Truffle/C Interpreter
    JOHANNES KEPLER UNIVERSITAT¨ LINZ JKU Faculty of Engineering and Natural Sciences Truffle/C Interpreter Master’s Thesis submitted in partial fulfillment of the requirements for the academic degree Diplom-Ingenieur in the Master’s Program Computer Science Submitted by Manuel Rigger, BSc. At the Institut f¨urSystemsoftware Advisor o.Univ.-Prof. Dipl.-Ing. Dr.Dr.h.c. Hanspeter M¨ossenb¨ock Co-advisor Dipl.-Ing. Lukas Stadler Dipl.-Ing. Dr. Thomas W¨urthinger Xiamen, April 2014 Contents I Contents 1 Introduction 3 1.1 Motivation . .3 1.2 Goals and Scope . .4 1.3 From C to Java . .4 1.4 Structure of the Thesis . .6 2 State of the Art 9 2.1 Graal . .9 2.2 Truffle . 10 2.2.1 Rewriting and Specialization . 10 2.2.2 Truffle DSL . 11 2.2.3 Control Flow . 12 2.2.4 Profiling and Inlining . 12 2.2.5 Partial Evaluation and Compilation . 12 2.3 Clang . 13 3 Architecture 14 3.1 From Clang to Java . 15 3.2 Node Construction . 16 3.3 Runtime . 16 4 The Truffle/C File 17 4.1 Truffle/C File Format Goals . 17 4.2 Truffle/C File Format 1 . 19 4.2.1 Constant Pool . 19 4.2.2 Function Table . 20 4.2.3 Functions and Attributes . 20 4.3 Truffle/C File Considerations and Comparison . 21 4.3.1 Java Class File and Truffle/C File . 21 4.3.2 ELF and Truffle/C File . 22 4.4 Clang Modification Truffle/C File . 23 Contents II 5 Truffle/C Data Types 25 5.1 Data Type Hierarchy: Boxing, Upcasts and Downcasts .
    [Show full text]