Class SrcElement<S,T>

java.lang.Object
ch.raffael.meldioc.model.SrcElement<S,T>

public abstract class SrcElement<S,T> extends Object
A raw AST-agnostic representation of the core elements making up a java program (class, method, method parameter) and their configurations.
  • Field Details

  • Method Details

    • builder

      public static <S, T> SrcElement.Builder<S,T> builder()
    • kind

      public abstract SrcElement.Kind kind()
    • name

      public abstract String name()
    • type

      public abstract T type()
    • source

      public abstract S source()
    • parent

      public SrcElement<S,T> parent()
    • synthetic

      public boolean synthetic()
    • withSynthetic

      public SrcElement<S,T> withSynthetic(boolean synthetic)
    • parentOption

      public abstract io.vavr.control.Option<SrcElement<S,T>> parentOption()
    • accessPolicy

      @Redacted public abstract AccessPolicy accessPolicy()
    • isStatic

      @Redacted public abstract boolean isStatic()
    • isFinal

      @Redacted public abstract boolean isFinal()
    • isSealed

      @Redacted public abstract boolean isSealed()
    • isAbstract

      @Redacted public abstract boolean isAbstract()
    • isOverridable

      public boolean isOverridable()
    • configs

      @Redacted public abstract io.vavr.collection.Set<ElementConfig<S>> configs()
    • findClass

      public io.vavr.control.Option<SrcElement<S,T>> findClass()
    • findOutermost

      public SrcElement<S,T> findOutermost()
    • accessibleTo

      public boolean accessibleTo(Adaptor<S,T> adaptor, SrcElement<S,T> that)
    • accessibleToByExtension

      public boolean accessibleToByExtension(Adaptor<S,T> adaptor, SrcElement<S,T> that)
    • accessibleTo

      public boolean accessibleTo(Adaptor<S,T> adaptor, SrcElement<S,T> that, boolean byExtension)
    • canOverride

      public boolean canOverride(SrcElement<S,T> that, Adaptor<S,T> adaptor)
    • methodSignature

      @Lazy public io.vavr.Tuple2<String,io.vavr.collection.Seq<SrcElement<?,T>>> methodSignature()
    • withoutSource

      public SrcElement<?,T> withoutSource()
    • source

      public <ES extends S> ES source(Class<ES> type) throws InconsistentModelException
      Throws:
      InconsistentModelException
    • type

      public <ET extends T> ET type(Class<ET> type) throws InconsistentModelException
      Throws:
      InconsistentModelException
    • isInnerClass

      public boolean isInnerClass()
    • narrow

      public SrcElement<S,T> narrow(SrcElement.Kind kind)
    • narrow

      public <ES extends S, ET extends T> SrcElement<ES,ET> narrow(@Nullable @Nullable Class<ES> sourceType, @Nullable @Nullable Class<ET> typeType)
    • narrow

      public <ES extends S, ET extends T> SrcElement<ES,ET> narrow(@Nullable @Nullable SrcElement.Kind kind, @Nullable @Nullable Class<ES> sourceType, @Nullable @Nullable Class<ET> typeType)
    • detach

      public SrcElement<io.vavr.control.Option.None<Void>,io.vavr.control.Option.None<Void>> detach()
    • configurationConfig

      public ConfigurationConfig<S> configurationConfig()
    • configurationConfigOption

      public io.vavr.control.Option<ConfigurationConfig<S>> configurationConfigOption()
    • setupConfig

      public SetupConfig<S> setupConfig()
    • setupConfigOption

      public io.vavr.control.Option<SetupConfig<S>> setupConfigOption()
    • parameterConfig

      public ParameterConfig<S> parameterConfig()
    • parameterConfigOption

      public io.vavr.control.Option<ParameterConfig<S>> parameterConfigOption()
    • parameterPrefixConfig

      public ParameterPrefixConfig<S> parameterPrefixConfig()
    • parameterPrefixConfigOption

      public io.vavr.control.Option<ParameterPrefixConfig<S>> parameterPrefixConfigOption()
    • extensionPointConfig

      public ExtensionPointConfig<S> extensionPointConfig()
    • extensionPointConfigOption

      public io.vavr.control.Option<ExtensionPointConfig<S>> extensionPointConfigOption()
    • featureConfig

      public FeatureConfig<S> featureConfig()
    • featureConfigOption

      public io.vavr.control.Option<FeatureConfig<S>> featureConfigOption()
    • mountConfig

      public MountConfig<S> mountConfig()
    • mountConfigOption

      public io.vavr.control.Option<MountConfig<S>> mountConfigOption()
    • provisionConfig

      public ProvisionConfig<S> provisionConfig()
    • provisionConfigOption

      public io.vavr.control.Option<ProvisionConfig<S>> provisionConfigOption()
    • withKind

      SrcElement<S,T> withKind(SrcElement.Kind value)
      Copy the current immutable object by setting a value for the kind attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for kind
      Returns:
      A modified copy of the this object
    • withName

      SrcElement<S,T> withName(String value)
      Copy the current immutable object by setting a value for the name attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withType

      SrcElement<S,T> withType(T value)
      Copy the current immutable object by setting a value for the type attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy of the this object
    • withSource

      SrcElement<S,T> withSource(S value)
      Copy the current immutable object by setting a value for the source attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for source
      Returns:
      A modified copy of the this object
    • withSynthesized

      SrcElement<S,T> withSynthesized(boolean value)
      Copy the current immutable object by setting a value for the synthesized attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for synthesized
      Returns:
      A modified copy of the this object
    • withParentOption

      SrcElement<S,T> withParentOption(io.vavr.control.Option<SrcElement<S,T>> value)
      Copy the current immutable object by setting a value for the parentOption attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parentOption
      Returns:
      A modified copy of the this object
    • withAccessPolicy

      SrcElement<S,T> withAccessPolicy(AccessPolicy value)
      Copy the current immutable object by setting a value for the accessPolicy attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for accessPolicy
      Returns:
      A modified copy of the this object
    • withIsStatic

      SrcElement<S,T> withIsStatic(boolean value)
      Copy the current immutable object by setting a value for the isStatic attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isStatic
      Returns:
      A modified copy of the this object
    • withIsFinal

      SrcElement<S,T> withIsFinal(boolean value)
      Copy the current immutable object by setting a value for the isFinal attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isFinal
      Returns:
      A modified copy of the this object
    • withIsSealed

      SrcElement<S,T> withIsSealed(boolean value)
      Copy the current immutable object by setting a value for the isSealed attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isSealed
      Returns:
      A modified copy of the this object
    • withIsAbstract

      SrcElement<S,T> withIsAbstract(boolean value)
      Copy the current immutable object by setting a value for the isAbstract attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isAbstract
      Returns:
      A modified copy of the this object
    • withParameters

      SrcElement<S,T> withParameters(io.vavr.collection.Seq<SrcElement<S,T>> value)
      Copy the current immutable object by setting a value for the parameters attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parameters
      Returns:
      A modified copy of the this object
    • withExceptions

      SrcElement<S,T> withExceptions(io.vavr.collection.Seq<T> value)
      Copy the current immutable object by setting a value for the exceptions attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for exceptions
      Returns:
      A modified copy of the this object
    • withConfigs

      SrcElement<S,T> withConfigs(io.vavr.collection.Set<ElementConfig<S>> value)
      Copy the current immutable object by setting a value for the configs attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for configs
      Returns:
      A modified copy of the this object