Tabnine Logo
manifold.api.host
Code IndexAdd Tabnine to your IDE (free)

How to use manifold.api.host

Best Java code snippets using manifold.api.host (Showing top 20 results out of 315)

origin: systems.manifold/manifold-darkj

@Override
public boolean accept( IModule module )
{
 // Dark Java files are intended to be compiled dynamically at runtime, they
 // should never be compiled statically, otherwise just use normal Java.
 return module.getHost() instanceof IRuntimeManifoldHost;
}
origin: manifold-systems/manifold

default IFileSystem getFileSystem()
{
 return getHost().getFileSystem();
}
origin: manifold-systems/manifold

public TypeSystemAwareCache( IManifoldHost host, String name, int size, Loader<K, V> loader )
{
 super( name, size, loader );
 host.addTypeSystemListenerAsWeakRef( null, _cacheClearer );
}
origin: manifold-systems/manifold

public PathCache( IModule module, Supplier<Collection<IDirectory>> pathSupplier, Runnable clearHandler )
{
 _module = module;
 _pathSupplier = pathSupplier;
 _clearHandler = clearHandler;
 _reverseMap = new ConcurrentHashMap<>();
 init();
 _module.getHost().addTypeSystemListenerAsWeakRef( module, _clearer = new CacheClearer() );
}
origin: systems.manifold/manifold-ext

private boolean isInnerToJavaClass( String topLevel, String relativeInner )
{
 try
 {
  Class<?> cls = Class.forName( topLevel, false, getModule().getHost().getActualClassLoader() );
  for( Class<?> inner : cls.getDeclaredClasses() )
  {
   if( isInnerClass( inner, relativeInner ) )
   {
    return true;
   }
  }
 }
 catch( ClassNotFoundException ignore )
 {
 }
 return false;
}
origin: manifold-systems/manifold

private boolean isClassFile( TypeName tn )
{
 String fqn = tn.name;
 int iDollar = fqn.indexOf( '$' );
 if( iDollar > 0 )
 {
  fqn = fqn.substring( 0, iDollar );
 }
 PathCache pathCache = getHost().getSingleModule().getPathCache();
 return pathCache.getExtensionCache( "class" ).get( fqn ) != null;
}
origin: manifold-systems/manifold

/**
 * Loads, but does not initialize, all type manifolds managed by this module.
 *
 * @return The complete set of type manifolds this module manages.
 */
default SortedSet<ITypeManifold> loadTypeManifolds()
{
 // note type manifolds are sorted via getTypeManifoldSorter(), hence the use of TreeSet
 SortedSet<ITypeManifold> typeManifolds = new TreeSet<>( getTypeManifoldSorter() );
 loadBuiltIn( typeManifolds );
 loadRegistered( typeManifolds );
 return typeManifolds;
}
origin: manifold-systems/manifold

/**
 * Loads, but does not initialize, all <i>built-in</i> type manifolds managed by this module.
 * A built-in type manifold is not registered as a Java service, instead it is constructed directly.
 */
default void loadBuiltIn( Set<ITypeManifold> tms )
{
 List<String> excludedTypeManifolds = getExcludedTypeManifolds();
 addBuiltIn( PropertiesTypeManifold.class, tms, excludedTypeManifolds );
 addBuiltIn( ImageTypeManifold.class, tms, excludedTypeManifolds );
 addBuiltIn( DarkJavaTypeManifold.class, tms, excludedTypeManifolds );
}
origin: manifold-systems/manifold

@Override
public boolean accept( IModule module )
{
 // Dark Java files are intended to be compiled dynamically at runtime, they
 // should never be compiled statically, otherwise just use normal Java.
 return module.getHost() instanceof IRuntimeManifoldHost;
}
origin: manifold-systems/manifold

/**
 * @param module  The module passed into the ISourceProvider implementation constructor
 * @param modelMapper A function to provide a model given a qualified name and resource file
 */
protected void init( IModule module, BiFunction<String, Set<IFile>, M> modelMapper )
{
 _module = module;
 _modelMapper = modelMapper;
 _fqnToModel = LocklessLazyVar.make( this::buildFqnToModelCache );
 getModule().getHost().addTypeSystemListenerAsWeakRef( getModule(), _cacheClearer = createCacheClearer() );
}
origin: manifold-systems/manifold

private boolean isInnerToJavaClass( String topLevel, String relativeInner )
{
 try
 {
  Class<?> cls = Class.forName( topLevel, false, getModule().getHost().getActualClassLoader() );
  for( Class<?> inner : cls.getDeclaredClasses() )
  {
   if( isInnerClass( inner, relativeInner ) )
   {
    return true;
   }
  }
 }
 catch( ClassNotFoundException ignore )
 {
 }
 return false;
}
origin: manifold-systems/manifold

@Override
protected Map<String, LocklessLazyVar<Model>> getPeripheralTypes()
{
 return SystemProperties.make( getModule().getHost() );
}
origin: systems.manifold/manifold-properties

@Override
protected Map<String, LocklessLazyVar<Model>> getPeripheralTypes()
{
 return SystemProperties.make( getModule().getHost() );
}
origin: manifold-systems/manifold

@Override
protected Model createModel( String extensionFqn, Set<IFile> files )
{
 return new Model( getModule().getHost(), extensionFqn, files );
}
origin: manifold-systems/manifold

@Override
public IManifoldHost getHost()
{
 return getTypeManifold().getModule().getHost();
}
origin: systems.manifold/manifold-darkj

@Override
public void init( IModule module )
{
 init( module, (fqn, files) -> new Model( getModule().getHost(), fqn, files ) );
}
origin: manifold-systems/manifold

@Override
public void init( IModule module )
{
 init( module, (fqn, files) -> new Model( getModule().getHost(), fqn, files ) );
}
origin: systems.manifold/manifold-properties

public void init( IModule module )
{
 init( module, (fqn,files) -> new Model( getModule().getHost(), fqn, files ) );
}
origin: systems.manifold/manifold-image

@Override
public void init( IModule module )
{
 init( module, (host, fqn) -> new Model( getModule().getHost(), host, fqn ) );
}
origin: manifold-systems/manifold

@Override
public void init( IModule module )
{
 init( module, (host, fqn) -> new Model( getModule().getHost(), host, fqn ) );
}
manifold.api.host

Most used classes

  • IModule
  • IManifoldHost
  • IRuntimeManifoldHost
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now