All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intellij.psi.meta.PsiMetaData Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1-1.0.25
Show newest version
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.psi.meta;

import com.intellij.openapi.util.NlsSafe;
import com.intellij.psi.PsiElement;
import com.intellij.util.ArrayUtilRt;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

/**
 * @author peter
 *
 * @see MetaDataRegistrar#registerMetaData(com.intellij.psi.filters.ElementFilter, Class)
 * @see PsiMetaOwner#getMetaData()
 */
public interface PsiMetaData {
  PsiElement getDeclaration();

  @NonNls
  String getName(PsiElement context);

  @NlsSafe String getName();

  void init(PsiElement element);

  /**
   * @return objects this meta data depends on.
   * @see com.intellij.psi.util.CachedValue
   */
  default Object @NotNull [] getDependencies() {
    //noinspection deprecation
    return getDependences();
  }

  /** @deprecated use {@link PsiMetaData#getDependencies()} */
  @Deprecated
  default Object @NotNull [] getDependences() {
    return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy