public final class DirectiveInfo extends Object
DirectiveInfo contains information about each individual
directive loaded. It also holds additional information like usage, description,
scope,categories and the whether the directive is deprecated or not.
Each instance of this class contains information for one directive.SystemDirectiveRegistry,
UserDirectiveRegistry,
CompositeDirectiveRegistry| Modifier and Type | Method and Description |
|---|---|
String[] |
categories() |
UsageDefinition |
definition() |
boolean |
deprecated() |
String |
description() |
static DirectiveInfo |
fromSystem(Class<? extends Directive> cls)
Creates a
DirectiveInfo of the given class coming from the DirectiveScope.SYSTEM scope. |
static DirectiveInfo |
fromUser(Class<? extends Directive> cls,
ArtifactId artifactId)
Creates a
DirectiveInfo of the given class coming from the DirectiveScope.USER scope. |
DirectiveClass |
getDirectiveClass() |
Directive |
instance()
Creates a new instance of
Directive. |
String |
name() |
DirectiveScope |
scope() |
String |
usage() |
public static DirectiveInfo fromSystem(Class<? extends Directive> cls) throws InstantiationException, IllegalAccessException
DirectiveInfo of the given class coming from the DirectiveScope.SYSTEM scope.public static DirectiveInfo fromUser(Class<? extends Directive> cls, @Nullable ArtifactId artifactId) throws InstantiationException, IllegalAccessException
DirectiveInfo of the given class coming from the DirectiveScope.USER scope.public DirectiveClass getDirectiveClass()
DirectiveClass which contains the class information of this directive.public boolean deprecated()
Boolean type that indicates if Directive has been deprecated or not.public DirectiveScope scope()
Scope type specifying either USER or SYSTEM scope the directive is deployed in.public String name()
String type specifying the name of the directive.public String usage()
String type containing the usage information of the directive.public String description()
String type providing the description for a directive.public UsageDefinition definition()
String type specifying the definition information of directive.public String[] categories()
String array providing the categories the directive is associated with.public Directive instance() throws IllegalAccessException, InstantiationException
Directive.Directive instance.IllegalAccessException - thrown when an application tries to reflectively create an instanceInstantiationException - Thrown when an application tries to create an instance of a class
using the newInstance method in class ClassCopyright © 2024 CDAP Licensed under the Apache License, Version 2.0.