Package org.eclipse.aether.metadata
Class AbstractMetadata
java.lang.Object
org.eclipse.aether.metadata.AbstractMetadata
- All Implemented Interfaces:
Metadata
- Direct Known Subclasses:
DefaultMetadata
A skeleton class for metadata.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.aether.metadata.Metadata
Metadata.Nature
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopyProperties
(Map<String, String> properties) Copies the specified metadata properties.boolean
Compares this metadata with the specified object.getProperty
(String key, String defaultValue) Gets the specified property.int
hashCode()
Returns a hash code for this metadata.Deprecated.Sets the file of the metadata.setProperties
(Map<String, String> properties) Sets the properties for the metadata.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.aether.metadata.Metadata
getArtifactId, getFile, getGroupId, getNature, getPath, getProperties, getType, getVersion
-
Constructor Details
-
AbstractMetadata
public AbstractMetadata()
-
-
Method Details
-
setFile
Deprecated.Description copied from interface:Metadata
Sets the file of the metadata. -
setPath
Description copied from interface:Metadata
Sets the file of the metadata. -
setProperties
Description copied from interface:Metadata
Sets the properties for the metadata.- Specified by:
setProperties
in interfaceMetadata
- Parameters:
properties
- The properties for the metadata, may benull
.- Returns:
- The new metadata, never
null
.
-
getProperty
Description copied from interface:Metadata
Gets the specified property.- Specified by:
getProperty
in interfaceMetadata
- Parameters:
key
- The name of the property, must not benull
.defaultValue
- The default value to return in case the property is not set, may benull
.- Returns:
- The requested property value or
null
if the property is not set and no default value was provided.
-
copyProperties
Copies the specified metadata properties. This utility method should be used when creating new metadata instances with caller-supplied properties.- Parameters:
properties
- The properties to copy, may benull
.- Returns:
- The copied and read-only properties, never
null
.
-
toString
-
equals
Compares this metadata with the specified object. -
hashCode
Returns a hash code for this metadata.
-