PTP
Release 7.0

org.eclipse.ptp.pldt.common
Class Artifact

java.lang.Object
  extended by org.eclipse.ptp.pldt.common.Artifact
All Implemented Interfaces:
IArtifact

public class Artifact
extends java.lang.Object
implements IArtifact


Field Summary
static int CONSTANT
          Constant used in marker to indicate type of artifact is a constant
static java.lang.String[] CONSTRUCT_TYPE_NAMES
          List of construct names, used to index into for table headings
static int FUNCTION_CALL
          Constant used in marker to indicate type of artifact is a function call
static int NONE
          Constant used in marker to indicate type of artifact is unspecified
static int PRAGMA
          Constant used in marker to indicate type of artifact is a pragma
 
Constructor Summary
Artifact(java.lang.String fileName, int line, int column, java.lang.String shortName, SourceInfo sourceInfo)
          Create an Artifact to keep track of an something found in a file.
Artifact(java.lang.String fileName, int line, int column, java.lang.String shortName, java.lang.String desc, boolean ignore, java.lang.String primaryFileName, SourceInfo sourceInfo)
          Create an artifact to keep track of something in a file, including file name
Artifact(java.lang.String fileName, int line, int column, java.lang.String shortName, java.lang.String desc, SourceInfo sourceInfo, java.lang.Object artifactAssist)
          Create an Artifact to keep track of an MPI function call (or similar item) in a file, including an object that may be an AST node for convenience.
 
Method Summary
 java.lang.Object getArtifactAssist()
          Returns an object cached for assisting in artifact analysis, possibly an AST node
 int getColumn()
          Get the column number within the line
 java.lang.String getDescription()
          Get text description of the artifact
 java.lang.String getFileName()
          Get string representation of the filename containing the artifact
 java.lang.String getId()
          Get unique ID
 int getLine()
          Get line number within file
 int getNewline()
          Get new line (perhaps unused)
 java.lang.String getPrimaryfileName()
           
 java.lang.String getShortName()
          Get short name of artifact
 SourceInfo getSourceInfo()
          Get detailed location info on where the artifact is located in the file (more than just line number, for example)
 void setColumn(int column_)
          Set the column number within the line
 void setDescription(java.lang.String description_)
           
 void setFileName(java.lang.String fileName_)
           
protected  void setId()
          Set unique ID for this MPI artifact.
 void setLine(int line_)
          Set the line number within the file
 void setPrimaryfileName(java.lang.String primaryfileName)
          Which file-analysis-invocation gave rise to this artifact.
 void setShortName(java.lang.String shortName_)
          Set short name for artifact
 java.lang.String toString()
          Hand representation of data, useful for debugging, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Constant used in marker to indicate type of artifact is unspecified

See Also:
Constant Field Values

FUNCTION_CALL

public static final int FUNCTION_CALL
Constant used in marker to indicate type of artifact is a function call

See Also:
Constant Field Values

CONSTANT

public static final int CONSTANT
Constant used in marker to indicate type of artifact is a constant

See Also:
Constant Field Values

PRAGMA

public static final int PRAGMA
Constant used in marker to indicate type of artifact is a pragma

See Also:
Constant Field Values

CONSTRUCT_TYPE_NAMES

public static final java.lang.String[] CONSTRUCT_TYPE_NAMES
List of construct names, used to index into for table headings

Constructor Detail

Artifact

public Artifact(java.lang.String fileName,
                int line,
                int column,
                java.lang.String shortName,
                SourceInfo sourceInfo)
Create an Artifact to keep track of an something found in a file.

Parameters:
fileName -
line -
column -
shortName -
ignore -
primaryFileName -
Since:
4.0

Artifact

public Artifact(java.lang.String fileName,
                int line,
                int column,
                java.lang.String shortName,
                java.lang.String desc,
                SourceInfo sourceInfo,
                java.lang.Object artifactAssist)
Create an Artifact to keep track of an MPI function call (or similar item) in a file, including an object that may be an AST node for convenience.

Parameters:
fileName -
line -
column -
shortName -
desc -
sourceInfo -
artifactAssist -

Artifact

public Artifact(java.lang.String fileName,
                int line,
                int column,
                java.lang.String shortName,
                java.lang.String desc,
                boolean ignore,
                java.lang.String primaryFileName,
                SourceInfo sourceInfo)
Create an artifact to keep track of something in a file, including file name

Parameters:
fileName -
line -
column -
shortName -
desc -
ignore -
primaryFileName -
sourceInfo -
Method Detail

setId

protected void setId()
Set unique ID for this MPI artifact. Base 36 values use 0..9a...z and are at most 8 characters long. Will not be repeated (u


getId

public java.lang.String getId()
Get unique ID

Specified by:
getId in interface IArtifact
Returns:

toString

public java.lang.String toString()
Hand representation of data, useful for debugging, etc.

Overrides:
toString in class java.lang.Object

getColumn

public int getColumn()
Description copied from interface: IArtifact
Get the column number within the line

Specified by:
getColumn in interface IArtifact
Returns:

setColumn

public void setColumn(int column_)
Description copied from interface: IArtifact
Set the column number within the line

Specified by:
setColumn in interface IArtifact

getDescription

public java.lang.String getDescription()
Description copied from interface: IArtifact
Get text description of the artifact

Specified by:
getDescription in interface IArtifact
Returns:

setDescription

public void setDescription(java.lang.String description_)
Parameters:
description_ -

getFileName

public java.lang.String getFileName()
Description copied from interface: IArtifact
Get string representation of the filename containing the artifact

Specified by:
getFileName in interface IArtifact
Returns:

setFileName

public void setFileName(java.lang.String fileName_)
Parameters:
fileName_ -

getLine

public int getLine()
Description copied from interface: IArtifact
Get line number within file

Specified by:
getLine in interface IArtifact
Returns:

setLine

public void setLine(int line_)
Description copied from interface: IArtifact
Set the line number within the file

Specified by:
setLine in interface IArtifact

getPrimaryfileName

public java.lang.String getPrimaryfileName()
Specified by:
getPrimaryfileName in interface IArtifact
Returns:

setPrimaryfileName

public void setPrimaryfileName(java.lang.String primaryfileName)
Which file-analysis-invocation gave rise to this artifact.
(Analyzing one file may produce artifacts in another file. This is the first one)

Parameters:
primaryfileName -

getShortName

public java.lang.String getShortName()
Description copied from interface: IArtifact
Get short name of artifact

Specified by:
getShortName in interface IArtifact
Returns:

setShortName

public void setShortName(java.lang.String shortName_)
Description copied from interface: IArtifact
Set short name for artifact

Specified by:
setShortName in interface IArtifact

getSourceInfo

public SourceInfo getSourceInfo()
Get detailed location info on where the artifact is located in the file (more than just line number, for example)

Specified by:
getSourceInfo in interface IArtifact
Returns:
Returns the sourceInfo_.

getNewline

public int getNewline()
Get new line (perhaps unused)

Returns:

getArtifactAssist

public java.lang.Object getArtifactAssist()
Returns an object cached for assisting in artifact analysis, possibly an AST node

Returns:

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.