Top Description Fields Constructors Methods
org.aspectj.asm.internal

public Class JDTLikeHandleProvider

extends Object
implements IElementHandleProvider
Class Inheritance
All Implemented Interfaces
org.aspectj.asm.IElementHandleProvider
Imports
java.io.File, java.util.List, org.aspectj.asm.AsmManager, .IElementHandleProvider, .IProgramElement, org.aspectj.bridge.ISourceLocation

Creates JDT-like handles, for example

Field Summary

Modifier and TypeField and Description
private final AsmManager
private static final String
private static final char[]
private static final char[]
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
private char[]
convertCount(char[] c)

Only returns the count if it's not equal to 1

public String
public String
public String
createHandleIdentifier(File sourceFile, int line, int column, int offset)

Implements org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

public boolean
private char[]

Returns:

a char suffix that will either be empty or of the form "!"
getCount
(IProgramElement
the program element for which the handle is being constructed
ipe
)

Determine a count to be suffixed to the handle, this is only necessary for identical looking entries at the same level in the model (for example two anonymous class declarations).

public String
getFileForHandle(String handle)

Implements org.aspectj.asm.IElementHandleProvider.getFileForHandle.

Note

this is necessary for the current implementation to look up nodes, but we may want to consider removing it.

public int
getLineNumberForHandle(String handle)

Implements org.aspectj.asm.IElementHandleProvider.getLineNumberForHandle.

Note

this is necessary for the current implementation to look up nodes, but we may want to consider removing it.

public int
private String
public void
initialize()

Implements org.aspectj.asm.IElementHandleProvider.initialize.

Initializes handle provider state.
private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asmback to summary
private final AsmManager asm
backslashback to summary
private static final String backslash
countDelimback to summary
private static final char[] countDelim
emptyback to summary
private static final char[] empty
emptyStringback to summary
private static final String emptyString

Constructor Detail

JDTLikeHandleProviderback to summary
public JDTLikeHandleProvider(AsmManager asm)

Method Detail

computeCountBasedOnPeersback to summary
private int computeCountBasedOnPeers(IProgramElement ipe)
convertCountback to summary
private char[] convertCount(char[] c)

Only returns the count if it's not equal to 1

createHandleIdentifierback to summary
public String createHandleIdentifier(IProgramElement ipe)

Implements org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

Returns:String

Doc from org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

a String uniquely identifying this element

createHandleIdentifierback to summary
public String createHandleIdentifier(ISourceLocation location)

Implements org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

Returns:String

Doc from org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

a String uniquely identifying this element

createHandleIdentifierback to summary
public String createHandleIdentifier(File sourceFile, int line, int column, int offset)

Implements org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

Returns:String

Doc from org.aspectj.asm.IElementHandleProvider.createHandleIdentifier.

a String uniquely identifying this element

dependsOnLocationback to summary
public boolean dependsOnLocation()
getCountback to summary
private char[] getCount(IProgramElement ipe)

Determine a count to be suffixed to the handle, this is only necessary for identical looking entries at the same level in the model (for example two anonymous class declarations). The format is ! where n will be greater than 2.

Parameters
ipe:IProgramElement

the program element for which the handle is being constructed

Returns:char[]

a char suffix that will either be empty or of the form "!"

getFileForHandleback to summary
public String getFileForHandle(String handle)

Implements org.aspectj.asm.IElementHandleProvider.getFileForHandle.

Doc from org.aspectj.asm.IElementHandleProvider.getFileForHandle.

Note

this is necessary for the current implementation to look up nodes, but we may want to consider removing it.

Returns:String

a String corresponding to the

getLineNumberForHandleback to summary
public int getLineNumberForHandle(String handle)

Implements org.aspectj.asm.IElementHandleProvider.getLineNumberForHandle.

Doc from org.aspectj.asm.IElementHandleProvider.getLineNumberForHandle.

Note

this is necessary for the current implementation to look up nodes, but we may want to consider removing it.

Returns:int

the line number corresponding to this handel

getOffSetForHandleback to summary
public int getOffSetForHandle(String handle)

Implements org.aspectj.asm.IElementHandleProvider.getOffSetForHandle.

getParametersback to summary
private String getParameters(IProgramElement ipe)
initializeback to summary
public void initialize()

Implements org.aspectj.asm.IElementHandleProvider.initialize.

Doc from org.aspectj.asm.IElementHandleProvider.initialize.

Initializes handle provider state. The initializer is invoked when a new ASM is created on a full build.

shortenIpeSigback to summary
private String shortenIpeSig(String ipeSig)