GNU Classpath and Java 1.5 2 GNU Classpath the Generics Branch Virtual Machines and Compilers the Future

GNU Classpath and Java 1.5 2 GNU Classpath the Generics Branch Virtual Machines and Compilers the Future

Java 1.5 GNU Classpath Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 2 GNU Classpath The Generics Branch Virtual Machines and Compilers The Future Java 1.5 GNU Classpath Outline 1 Java 1.5 Generics Enumerations Annotations Other Additions Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Java 1.5 GNU Classpath Outline 1 Java 1.5 Generics Enumerations Annotations Other Additions 2 GNU Classpath The Generics Branch Virtual Machines and Compilers The Future Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Outline 1 Java 1.5 Generics Enumerations Annotations Other Additions 2 GNU Classpath The Generics Branch Virtual Machines and Compilers The Future Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Annotations Enumerations Three major changes: Plus lots of syntactic sugar Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Annotations Enumerations Plus lots of syntactic sugar Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 Three major changes: 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Annotations Enumerations Plus lots of syntactic sugar Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 Three major changes: Generics 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Enumerations Plus lots of syntactic sugar Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 Three major changes: Generics Annotations 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Plus lots of syntactic sugar Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 Three major changes: Generics Annotations Enumerations 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Java 1.5 ‘the largest set of changes in the language’s history’ 1 Three major changes: Generics Annotations Enumerations Plus lots of syntactic sugar 1Preface to the Third Edition of the Java Language Specification Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Normal instance variables with values Type variables instantiated with a particular type. An instance of a generic class contains both: Thus, a class can be defined that generalizes over certain types. Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Normal instance variables with values Type variables instantiated with a particular type. Thus, a class can be defined that generalizes over certain types. Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. An instance of a generic class contains both: Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Type variables instantiated with a particular type. Thus, a class can be defined that generalizes over certain types. Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. An instance of a generic class contains both: Normal instance variables with values Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Thus, a class can be defined that generalizes over certain types. Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. An instance of a generic class contains both: Normal instance variables with values Type variables instantiated with a particular type. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. An instance of a generic class contains both: Normal instance variables with values Type variables instantiated with a particular type. Thus, a class can be defined that generalizes over certain types. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Type Variables The term ’generics’ basically refers to the introduction of type variables. An instance of a generic class contains both: Normal instance variables with values Type variables instantiated with a particular type. Thus, a class can be defined that generalizes over certain types. Derives from work on GJ by (Bracha, Odersky, Stoutamire and Wadler, 1998) – see the proceedings of OOPSLA in ACM SIGPLAN Notices 33 (10) pages 183–200. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Classes and Interfaces Constructors and Methods Variables which use a generic class as their type are referred to as parameterized types. That is, the exact type used is determined by the parameters used to instantiate the type variables. Example List<String> names; Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Constructors and Methods Variables which use a generic class as their type are referred to as parameterized types. That is, the exact type used is determined by the parameters used to instantiate the type variables. Example List<String> names; Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Classes and Interfaces Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Variables which use a generic class as their type are referred to as parameterized types. That is, the exact type used is determined by the parameters used to instantiate the type variables. Example List<String> names; Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Classes and Interfaces Constructors and Methods Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 That is, the exact type used is determined by the parameters used to instantiate the type variables. Example List<String> names; Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Classes and Interfaces Constructors and Methods Variables which use a generic class as their type are referred to as parameterized types. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Example List<String> names; Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Classes and Interfaces Constructors and Methods Variables which use a generic class as their type are referred to as parameterized types. That is, the exact type used is determined by the parameters used to instantiate the type variables. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions Parameterized Types Type variables can be associated with: Classes and Interfaces Constructors and Methods Variables which use a generic class as their type are referred to as parameterized types. That is, the exact type used is determined by the parameters used to instantiate the type variables. Example List<String> names; Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 When defining a collection of things, we want to say what type of thing we want to put in the collection. Prior to Java 1.5, we can’t Instead, we just call everything in the collection an instance of the common supertype, Object Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions How Is This Useful? Collections benefit most obviously from type variables. Andrew Hughes http://planet.classpath.org GNU Classpath and Java 1.5 Prior to Java 1.5, we can’t Instead, we just call everything in the collection an instance of the common supertype, Object Generics Java 1.5 Enumerations GNU Classpath Annotations Other Additions How Is This Useful? Collections benefit most obviously from type variables. When defining a collection of things, we want to say what type of thing we want to put in the collection.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    131 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us