Bug 71404 - Define MethodPattern, FieldPattern, ConstructorPattern terms
Summary: Define MethodPattern, FieldPattern, ConstructorPattern terms
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Docs (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.2.1   Edit
Assignee: Erik Hilsdale CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-04 14:52 EDT by Lukasz Skowronski CLA
Modified: 2004-10-21 04:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Skowronski CLA 2004-08-04 14:52:00 EDT
1. MethodPattern
2. FieldPattern
3. ConstructorPattern

Language semantics uses these terms without defining them. In my opinion the 
term "Id" isn't obvious too. At least it wasn't for me at the beginning.

I vote for define all these terms.

Regards
Luke
Comment 1 Erik Hilsdale CLA 2004-08-22 21:33:47 EDT
I'm not going to define Id, though the first few times I use it as a
metavariable I've added to the text language like "the identifier _Id_".
The Java spec folks did such a good job with definining what an
identifier is that I'm not going to duplicate their work *smile*.

As for the pattern comments, while there's a pretty good verbal description
of the pattern syntax and semantics, I've added the following subsection
to the end of the "pointcuts" section of the semantics appendix (warning:
bugzilla is about to screw up my line wrapping):

    Pattern Summary
    Here is a summary of the pattern syntax used in AspectJ: 

    MethodPattern = 
      [ModifiersPattern] TypePattern 
            [TypePattern . ] IdPattern (TypePattern | ".." , ... ) 
            [ throws ThrowsPattern ]
    ConstructorPattern = 
      [ModifiersPattern ] 
            [TypePattern . ] new (TypePattern | ".." , ...) 
            [ throws ThrowsPattern ]
    FieldPattern = 
      [ModifiersPattern] TypePattern [TypePattern . ] IdPattern
    ThrowsPattern = 
      [ ! ] TypePattern , ...
    TypePattern = 
        IdPattern [ + ] [ [] ... ]
        | ! TypePattern
        | TypePattern && TypePattern
        | TypePattern || TypePattern
        | ( TypePattern )  
    IdPattern =
      Sequence of characters, possibly with special * and .. wildcards
    ModifiersPattern =
      [ ! ] JavaModifier  ...

I've tried to make it informal enough to be editable/readable, 
but formal enough to be useful.  We'll see how it works out.
Comment 2 Adrian Colyer CLA 2004-10-21 04:31:34 EDT
Fix released as part of AspectJ 1.2.1