---
schema_version: "1"
id: 70ea990ca609bd83f6e5d5ddd75e804b388d94a787a84603c57261a14d3e9f45
title: Metadata Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_Metadata.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Metadata.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 193a0953dfdd3322d363fe3e77834101193c015aef5a7d3c8251b9c7a769e67d
description: An abstract base class that represents a custom metadata component.The full name of the custom metadata, which can include the namespace, type, and component name.Makes a duplicate copy of the Metadata.Metadata.
---
# Metadata Class

An abstract base class that represents a custom metadata component.

## Namespace

[Metadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Metadata.htm "The Metadata namespace provides classes and methods for working with custom metadata in Salesforce")

## Usage

You can’t create instances of this abstract class. Instead, create an instance of a specific custom metadata component class that derives from Metadata.Metadata, such as [Metadata.CustomMetadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_CustomMetadata.htm#apex_class_Metadata_CustomMetadata "Represents records of custom metadata types."). For more information, see [Metadata](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/metadata.htm) in the Metadata API Developer Guide.

- **[Metadata Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Metadata.htm#apex_Metadata_Metadata_properties)**
- **[Metadata Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Metadata.htm#apex_Metadata_Metadata_methods)**

## Metadata Properties

The following are properties for Metadata.

- **[fullName](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Metadata.htm#apex_Metadata_Metadata_fullName)**  
    The full name of the custom metadata, which can include the namespace, type, and component name.

### fullName

The full name of the custom metadata, which can include the namespace, type, and component name.

#### Signature

public String fullName {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The format of the full name can include the namespace, metadata type, and metadata component name. If you’re updating components in a namespace, you also need to qualify the namespace for the component in the full name. For example, the full name for a custom metadata "MDType1\_\_mdt" component named "Component1" that is contained in the "myPackage" namespace is "myPackage\_\_MDType1\_\_mdt.myPackage\_\_Component1". For more information on full name formats for different metadata types, see reference documentation on the metadata types in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_intro.htm "HTML (New Window)").

## Metadata Methods

The following are methods for Metadata.

- **[clone()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Metadata.htm#apex_Metadata_Metadata_clone)**  
    Makes a duplicate copy of the Metadata.Metadata.

### clone()

Makes a duplicate copy of the Metadata.Metadata.

#### Signature

public Object clone()

#### Return Value

Type: Object