org.aspectj.weaver.patterns
Class SimpleScope

java.lang.Object
  extended by org.aspectj.weaver.patterns.SimpleScope
All Implemented Interfaces:
IScope
Direct Known Subclasses:
BindingScope

public class SimpleScope
extends java.lang.Object
implements IScope


Field Summary
protected  FormalBinding[] bindings
           
 
Constructor Summary
SimpleScope(World world, FormalBinding[] bindings)
           
 
Method Summary
 ResolvedType getEnclosingType()
           
 FormalBinding getFormal(int i)
           
 int getFormalCount()
           
 java.lang.String[] getImportedNames()
           
 java.lang.String[] getImportedPrefixes()
           
 IMessageHandler getMessageHandler()
           
 World getWorld()
           
 FormalBinding lookupFormal(java.lang.String name)
           
 UnresolvedType lookupType(java.lang.String name, IHasPosition location)
           
static FormalBinding[] makeFormalBindings(UnresolvedType[] types, java.lang.String[] names)
           
 ISourceLocation makeSourceLocation(IHasPosition location)
           
 void message(IMessage.Kind kind, IHasPosition location1, IHasPosition location2, java.lang.String message)
           
 void message(IMessage.Kind kind, IHasPosition location, java.lang.String message)
           
 void message(IMessage aMessage)
           
 void setImportedNames(java.lang.String[] importedNames)
           
 void setImportedPrefixes(java.lang.String[] importedPrefixes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindings

protected FormalBinding[] bindings
Constructor Detail

SimpleScope

public SimpleScope(World world,
                   FormalBinding[] bindings)
Method Detail

lookupType

public UnresolvedType lookupType(java.lang.String name,
                                 IHasPosition location)
Specified by:
lookupType in interface IScope
Returns:
the type corresponding to the name in this scope, or ResolvedType.MISSING if no such type exists

getMessageHandler

public IMessageHandler getMessageHandler()
Specified by:
getMessageHandler in interface IScope

lookupFormal

public FormalBinding lookupFormal(java.lang.String name)
Specified by:
lookupFormal in interface IScope
Returns:
the formal associated with the name, or null if no such formal exists

getFormal

public FormalBinding getFormal(int i)
Specified by:
getFormal in interface IScope
Returns:
the formal with the index. Throws ArrayOutOfBounds exception if out of bounds

getFormalCount

public int getFormalCount()
Specified by:
getFormalCount in interface IScope

getImportedNames

public java.lang.String[] getImportedNames()
Specified by:
getImportedNames in interface IScope

getImportedPrefixes

public java.lang.String[] getImportedPrefixes()
Specified by:
getImportedPrefixes in interface IScope

setImportedNames

public void setImportedNames(java.lang.String[] importedNames)

setImportedPrefixes

public void setImportedPrefixes(java.lang.String[] importedPrefixes)

makeFormalBindings

public static FormalBinding[] makeFormalBindings(UnresolvedType[] types,
                                                 java.lang.String[] names)

makeSourceLocation

public ISourceLocation makeSourceLocation(IHasPosition location)

message

public void message(IMessage.Kind kind,
                    IHasPosition location1,
                    IHasPosition location2,
                    java.lang.String message)
Specified by:
message in interface IScope

message

public void message(IMessage.Kind kind,
                    IHasPosition location,
                    java.lang.String message)
Specified by:
message in interface IScope

message

public void message(IMessage aMessage)
Specified by:
message in interface IScope

getWorld

public World getWorld()
Specified by:
getWorld in interface IScope

getEnclosingType

public ResolvedType getEnclosingType()
Specified by:
getEnclosingType in interface IScope