Class ModuleImpl

java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<NoType>
io.determann.shadow.impl.shadow.ModuleImpl
All Implemented Interfaces:
Annotationable<ModuleElement>, ApiHolder, DeclaredHolder, ElementBacked<ModuleElement>, MirrorBacked<NoType>, Modifiable, QualifiedNameable<ModuleElement>, Module, Shadow<NoType>

public class ModuleImpl extends ShadowImpl<NoType> implements Module
  • Constructor Details

  • Method Details

    • getTypeKind

      public TypeKind getTypeKind()
      Specified by:
      getTypeKind in interface Shadow<NoType>
    • getElement

      public ModuleElement getElement()
      Specified by:
      getElement in interface ElementBacked<ModuleElement>
    • getPackages

      public List<Package> getPackages()
      Specified by:
      getPackages in interface Module
    • getDeclared

      public List<Declared> getDeclared()
      Specified by:
      getDeclared in interface DeclaredHolder
    • getDeclared

      public Optional<Declared> getDeclared(String qualifiedName)
      Specified by:
      getDeclared in interface DeclaredHolder
    • isOpen

      public boolean isOpen()
      Description copied from interface: Module
      can everybody use reflection on this module?
      Specified by:
      isOpen in interface Module
    • isUnnamed

      public boolean isUnnamed()
      Specified by:
      isUnnamed in interface Module
    • isAutomatic

      public boolean isAutomatic()
      Specified by:
      isAutomatic in interface Module
    • getDirectives

      public List<Directive> getDirectives()
      Description copied from interface: Module
      Relations between modules

      Different behavior for Provides! The jdk api returns redundant entries for Provides with multiple Provides.getImplementations() for java.desktop for example:

      
       provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider;
       provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider, com.sun.media.sound.MidiOutDeviceProvider;
       provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider, com.sun.media.sound.MidiOutDeviceProvider, com.sun.media.sound.RealTimeSequencerProvider;
       provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider, com.sun.media.sound.MidiOutDeviceProvider, com.sun.media.sound.RealTimeSequencerProvider, com.sun.media.sound.SoftProvider;
       
      this method will only return the complete entry
      
       provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider, com.sun.media.sound.MidiOutDeviceProvider, com.sun.media.sound.RealTimeSequencerProvider, com.sun.media.sound.SoftProvider;
       
      Specified by:
      getDirectives in interface Module
    • mapDirectives

      public <T> List<T> mapDirectives(DirectiveMapper<T> mapper)
      Specified by:
      mapDirectives in interface Module
    • consumeDirectives

      public void consumeDirectives(DirectiveConsumer consumer)
      Specified by:
      consumeDirectives in interface Module
    • representsSameType

      public boolean representsSameType(Shadow<? extends TypeMirror> shadow)
      Description copied from interface: Shadow
      type equals from the compiler perspective. for example ? does not equal ? for the compiler. use this method to compare Shadows when ever possible. Shadow.equals(Object) should only be used to compare the technical aspect of two objects. for example in a list implementation.
      Specified by:
      representsSameType in interface Shadow<NoType>
      Overrides:
      representsSameType in class ShadowImpl<NoType>
    • toString

      public String toString()
      Overrides:
      toString in class ShadowImpl<NoType>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Description copied from interface: Module
      be careful using this equals
      Specified by:
      equals in interface Module
      Specified by:
      equals in interface Shadow<NoType>
      Overrides:
      equals in class Object
      See Also: