Package org.apache.maven.model.building
Class FileModelSource
- java.lang.Object
-
- org.apache.maven.building.FileSource
-
- org.apache.maven.model.building.FileModelSource
-
- All Implemented Interfaces:
org.apache.maven.building.Source,ModelSource,ModelSource2
public class FileModelSource extends org.apache.maven.building.FileSource implements ModelSource2
Wraps an ordinaryFileas a model source.- Author:
- Benjamin Bentmann
-
-
Constructor Summary
Constructors Constructor Description FileModelSource(java.io.File pomFile)Creates a new model source backed by the specified file.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.net.URIgetLocationURI()Returns location of the POM, nevernull.java.io.FilegetPomFile()Deprecated.instead useFileSource.getFile()ModelSource2getRelatedSource(java.lang.String relPath)Returns model source identified by a path relative to this model source POM.inthashCode()-
Methods inherited from class org.apache.maven.building.FileSource
getFile, getInputStream, getLocation, toString
-
-
-
-
Method Detail
-
getPomFile
@Deprecated public java.io.File getPomFile()
Deprecated.instead useFileSource.getFile()- Returns:
- the file of this source
-
getRelatedSource
public ModelSource2 getRelatedSource(java.lang.String relPath)
Description copied from interface:ModelSource2Returns model source identified by a path relative to this model source POM. Implementation MUST be able to acceptrelPathparameter values that- use either / or \ file path separator
- have .. parent directory references
- point either at file or directory, in the latter case POM file name 'pom.xml' needs to be used by the requested model source.
- Specified by:
getRelatedSourcein interfaceModelSource2- Parameters:
relPath- is the path of the requested model source relative to this model source POM.- Returns:
- related model source or
nullif no such model source.
-
getLocationURI
public java.net.URI getLocationURI()
Description copied from interface:ModelSource2Returns location of the POM, nevernull.- Specified by:
getLocationURIin interfaceModelSource2
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-