Forms of LoD - PowerPoint PPT Presentation

About This Presentation
Title:

Forms of LoD

Description:

1. A parameter of the method, including the enclosing object (this or self); 1.1. ... 2.2 An element of a collection which is an attribute of the enclosing object; ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 6
Provided by: CCS55
Category:
Tags: lod | enclosing | forms

less

Transcript and Presenter's Notes

Title: Forms of LoD


1
Forms of LoD
forms class (c) object (o)
static(s), Prog. Anal. useful (c/s), simple definition useful (o/s), approximates o/d
dynamic(d), AspectJ not useful (c/d), c/s instead most useful (o/d), simple definition
2
Notes
  • o/s if an illegal message sending is possible
    assuming each decision taken both ways and each
    loop is executed 0 or more times.
  • c/d not interesting, because c/s. If
    dynamically do o/d

3
Note
  • The following aFoo.getPart().getPart().
  • getBar().getBp().test()
  • Should not be allowed in a static method.
  • Next follows a generalization of LoD to
  • static methods (slide after next). Do you agree?

4
Object form for regular methods
  • Within a method, messages can only be sent to the
    following objects
  • 1. A parameter of the method, including the
    enclosing object
  • (this or self)
  • 1.1. For pragmatic reasons a global object
  • 2. An immediate part object (computed or stored)
  • 2.1 An object that a method called on the
    enclosing object returns, including attributes of
    the enclosing object
  • 2.2 An element of a collection which is an
    attribute of the enclosing object
  • 3. An object created within the method.

5
Object form for static methods
  • Within a static method, messages can only be sent
    to the following objects
  • 1. A parameter of the method, including the
    current class
  • 1.1. For pragmatic reasons a global object
  • 2. An immediate static part object (computed or
    stored)
  • 2.1 An object that a static method called on the
    current class returns, including static
    attributes of the current class
  • 2.2 An element of a collection which is a static
    attribute of the current class
  • 3. An object created within the method.
Write a Comment
User Comments (0)
About PowerShow.com