站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

ReferenceHelper.RawReference (NetBeans Ant Project API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.project.support.ant
Class ReferenceHelper.RawReference

java.lang.Object
  extended byorg.netbeans.spi.project.support.ant.ReferenceHelper.RawReference
Enclosing class:
ReferenceHelper

public static final class ReferenceHelper.RawReference
extends Object

A raw reference descriptor representing a link to a foreign project and some build artifact used from it. This class corresponds directly to what it stored in project.xml to refer to a target in a foreign project. See AntArtifact for the precise meaning of several of the fields in this class.


Constructor Summary
ReferenceHelper.RawReference(String foreignProjectName, String artifactType, String newScriptLocation, String targetName, String cleanTargetName, String artifactID, Properties props)
          Create a raw reference descriptor.
ReferenceHelper.RawReference(String foreignProjectName, String artifactType, URI scriptLocation, String targetName, String cleanTargetName, String artifactID)
          Create a raw reference descriptor.
 
Method Summary
 String getArtifactType()
          Get the type of the foreign project's build artifact.
 String getCleanTargetName()
          Get the Ant target name to clean the artifact.
 String getForeignProjectName()
          Get the name of the foreign project as referred to from this project.
 String getID()
          Get the ID of the foreign project's build artifact.
 Properties getProperties()
           
 URI getScriptLocation()
          Deprecated. use getScriptLocationValue() instead; may return null now
 String getScriptLocationValue()
          Get absolute path location of the foreign project's build script.
 String getTargetName()
          Get the Ant target name to build the artifact.
 AntArtifact toAntArtifact(ReferenceHelper helper)
          Attempt to convert this reference to a live artifact object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReferenceHelper.RawReference

public ReferenceHelper.RawReference(String foreignProjectName,
                                    String artifactType,
                                    URI scriptLocation,
                                    String targetName,
                                    String cleanTargetName,
                                    String artifactID)
                             throws IllegalArgumentException
Create a raw reference descriptor. As this is basically just a struct, does no real work.

Parameters:
foreignProjectName - the name of the foreign project (usually its code name)
artifactType - the type of the build artifact
scriptLocation - the relative URI to the build script from the project directory
targetName - the Ant target name
cleanTargetName - the Ant clean target name
artifactID - the ID of the build artifact
Throws:
IllegalArgumentException - if the script location is given an absolute URI

ReferenceHelper.RawReference

public ReferenceHelper.RawReference(String foreignProjectName,
                                    String artifactType,
                                    String newScriptLocation,
                                    String targetName,
                                    String cleanTargetName,
                                    String artifactID,
                                    Properties props)
                             throws IllegalArgumentException
Create a raw reference descriptor. As this is basically just a struct, does no real work.

Parameters:
foreignProjectName - the name of the foreign project (usually its code name)
artifactType - the type of the build artifact
newScriptLocation - absolute path to the build script; can contain Ant-like properties
targetName - the Ant target name
cleanTargetName - the Ant clean target name
artifactID - the ID of the build artifact
props - optional properties to be used for target execution; never null
Throws:
IllegalArgumentException - if the script location is given an absolute URI
Since:
1.5
Method Detail

getForeignProjectName

public String getForeignProjectName()
Get the name of the foreign project as referred to from this project. Usually this will be the code name of the foreign project, but it may instead be a uniquified name. The name can be used in project properties and the build script to refer to the foreign project from among subprojects.

Returns:
the foreign project name

getArtifactType

public String getArtifactType()
Get the type of the foreign project's build artifact. For example, JavaProjectConstants.ARTIFACT_TYPE_JAR.

Returns:
the artifact type

getScriptLocation

public URI getScriptLocation()
Deprecated. use getScriptLocationValue() instead; may return null now

Get the location of the foreign project's build script relative to the project directory. This is the script which would be called to build the desired artifact.

Returns:
the script location

getScriptLocationValue

public String getScriptLocationValue()
Get absolute path location of the foreign project's build script. This is the script which would be called to build the desired artifact.

Returns:
absolute path possibly containing Ant properties

getTargetName

public String getTargetName()
Get the Ant target name to build the artifact.

Returns:
the target name

getCleanTargetName

public String getCleanTargetName()
Get the Ant target name to clean the artifact.

Returns:
the clean target name

getID

public String getID()
Get the ID of the foreign project's build artifact. See also AntArtifact.getID().

Returns:
the artifact identifier

getProperties

public Properties getProperties()

toAntArtifact

public AntArtifact toAntArtifact(ReferenceHelper helper)
Attempt to convert this reference to a live artifact object. This involves finding the referenced foreign project on disk (among standard project and private properties) and asking it for the artifact named by the given target. Given that object, you can find important further information such as the location of the actual artifact on disk.

Note that non-key attributes of the returned artifact (i.e. type, script location, and clean target name) might not match those in this raw reference.

Acquires read access.

Parameters:
helper - an associated reference helper used to resolve the foreign project location
Returns:
the actual Ant artifact object, or null if it could not be located

toString

public String toString()

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.