public abstract class AbstractExtensionProducer<M extends IModel> extends JavaTypeManifold<M> implements IExtensionClassProducer
ExtensionManifold
.
See ExtensionProducerSampleTypeManifold as a reference implementation.ResourceFileTypeManifold.CacheClearer
ARG_DUMP_SOURCE
Constructor and Description |
---|
AbstractExtensionProducer() |
Modifier and Type | Method and Description |
---|---|
protected ResourceFileTypeManifold.CacheClearer |
createCacheClearer() |
protected abstract M |
createModel(String extensionClassName,
Set<IFile> files) |
protected abstract String |
deriveExtendedClassFrom(String extensionClassFqn) |
String |
findTopLevelFqn(String fqn)
Overridden because the file's fqn isn't really a type for this type manifold,
only the extension classes derived from the files are types this manifold produces.
|
Set<String> |
getExtendedTypes()
The set of extension classes this type manifold produces.
|
protected abstract Set<String> |
getExtendedTypes(IFile file) |
Set<String> |
getExtendedTypesForFile(IFile file)
The set of classes extended via {$code file}.
|
Set<String> |
getExtensionClasses(String extendedType)
The subset of extension classes this type manifold produces that extend
fqn |
protected abstract String |
getFileExt() |
protected Map<String,manifold.util.concurrent.LocklessLazyVar<M>> |
getPeripheralTypes() |
String |
getTypeNameForFile(String defaultFqn,
IFile file)
The type name[s] produced from a file from an extension producer are the names of the extension classes
|
String[] |
getTypesForFile(IFile file) |
boolean |
handlesFileExtension(String fileExtension) |
void |
init(IModule moduleComponent) |
boolean |
isExtendedType(String fqn)
Does this type manifold produce extension class[es] for
fqn ? |
boolean |
isInnerType(String topLevelFqn,
String relativeInner) |
protected abstract String |
makeExtensionClassName(String extendedClassFqn) |
RefreshKind |
refreshedFile(IFile file,
String[] types,
RefreshKind kind) |
getClassType, getContributorKind, getSourceKind
clear, contribute, contribute, findFilesForType, getAdditionalTypes, getAllTypeNames, getContent, getModel, getModule, getPackage, getTypeNames, handlesFile, init, isDuplicate, isFileBacked, isPackage, isTopLevelType, isType
doInit, doUninit, init, isInited, uninit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, clear, contribute, enterPostJavaCompilation, findFilesForType, getAllTypeNames, getClassType, getContributorKind, getModule, getPackage, getSourceKind, getTypeNames, isPackage, isTopLevelType, isType
handlesFile, isFileBacked
compile, isSelfCompile, parse
getInterface
public void init(IModule moduleComponent)
init
in interface ITypeManifold
init
in class ResourceFileTypeManifold<M extends IModel>
protected abstract String getFileExt()
protected abstract M createModel(String extensionClassName, Set<IFile> files)
extensionClassName
using files
protected abstract String makeExtensionClassName(String extendedClassFqn)
extendedClassFqn
protected abstract String deriveExtendedClassFrom(String extensionClassFqn)
extendedClassFqn
public String getTypeNameForFile(String defaultFqn, IFile file)
getTypeNameForFile
in class ResourceFileTypeManifold<M extends IModel>
public String findTopLevelFqn(String fqn)
findTopLevelFqn
in class ResourceFileTypeManifold<M extends IModel>
protected ResourceFileTypeManifold.CacheClearer createCacheClearer()
createCacheClearer
in class ResourceFileTypeManifold<M extends IModel>
public RefreshKind refreshedFile(IFile file, String[] types, RefreshKind kind)
refreshedFile
in interface IFileConnected
refreshedFile
in class ResourceFileTypeManifold<M extends IModel>
public boolean handlesFileExtension(String fileExtension)
handlesFileExtension
in interface IFileConnected
protected Map<String,manifold.util.concurrent.LocklessLazyVar<M>> getPeripheralTypes()
getPeripheralTypes
in class ResourceFileTypeManifold<M extends IModel>
public boolean isInnerType(String topLevelFqn, String relativeInner)
isInnerType
in class ResourceFileTypeManifold<M extends IModel>
public boolean isExtendedType(String fqn)
IExtensionClassProducer
fqn
?isExtendedType
in interface IExtensionClassProducer
fqn
- The fully qualified name of a type for which this manifold may produce an extension classfqn
public Set<String> getExtensionClasses(String extendedType)
IExtensionClassProducer
fqn
getExtensionClasses
in interface IExtensionClassProducer
extendedType
- The fully qualified name of a potentially extended typefqn
public Set<String> getExtendedTypes()
IExtensionClassProducer
getExtendedTypes
in interface IExtensionClassProducer
public String[] getTypesForFile(IFile file)
getTypesForFile
in interface IFileConnected
getTypesForFile
in class ResourceFileTypeManifold<M extends IModel>
public Set<String> getExtendedTypesForFile(IFile file)
IExtensionClassProducer
getExtendedTypesForFile
in interface IExtensionClassProducer
file
- A resource file associated with this class producerCopyright © 2024. All rights reserved.