Package gw.internal.gosu.parser
Class TypeLoaderAccess
- java.lang.Object
-
- gw.config.BaseService
-
- gw.internal.gosu.parser.TypeLoaderAccess
-
- All Implemented Interfaces:
IService,ITypeSystem,IPluginHost
public class TypeLoaderAccess extends BaseService implements ITypeSystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interfaceTypeLoaderAccess.ArgCallable<V,A1>(package private) static interfaceTypeLoaderAccess.TypeGetter
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<IType,IType>_boxToPrimitiveMapprivate java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter>_defaultTypesprivate boolean_defaultTypesInitingprivate int_iRefreshChecksumprivate int_iSingleRefreshChecksumprivate java.util.concurrent.CopyOnWriteArrayList<java.lang.ref.WeakReference<ITypeLoaderListener>>_listenersprivate java.util.Map<IType,IType>_primitiveToBoxMapprivate java.util.List<TypeSystemShutdownListener>_shutdownListenersprivate static java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter>EMPTY_DEFAULT_TYPESprivate static java.lang.ThreadLocal<java.util.ArrayList<IModule>>g_moduleStackprivate TypeLoaderAccess.ArgCallable<IType,java.lang.Object>getIntrinsicTypeFromObject_Callableprivate TypeLoaderAccess.ArgCallable<IType,java.lang.String>getNamespaceTypeIfValid_Callablestatic LockingLazyVar<java.util.Map<java.lang.String,IJavaType>>PRIMITIVE_TYPES_BY_NAME
-
Constructor Summary
Constructors Constructor Description TypeLoaderAccess()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean_genericInterfacesClash(IType rhsType, IType lhsType)private static DefaultTypeLoader_getDefaultLoader()private voidaddGosuProxyClass(IdentitySet<ITypeRef> allTypes, IType type)voidaddShutdownListener(TypeSystemShutdownListener listener)voidaddTypeLoaderListenerAsWeakRef(ITypeLoaderListener l)Maintains weak refs to listeners.ITypeboundTypes(IType targetType, java.util.List<IType> typesToBound)booleancanCast(IType lhsType, IType rhsType)private booleancanCastCompountType(ICompoundType lhsType, IType rhsType)private booleancanCastMetaType(IType lhsType, IType rhsType)voidclearErrorTypes()private java.lang.StringcomputeFullyQualifiedName(java.lang.Class<?> javaClass)voiddumpGosuClassLoader()private voiddumpMaps()ITypefindParameterizedType(IType type, IType rhsType)private voidfireRefreshed()private booleangenericInterfacesClash(IType rhsType, IType lhsType)ITypeget(IJavaClassInfo javaClassInfo)Gets the intrinsic type for a given class info object.ITypeget(java.lang.Class<?> javaClass)Gets the intrinsic type for a given class.ITypegetActualType(IType type, TypeVarToTypeMap actualParamByVarName, boolean bKeepTypeVars)java.util.List<ITypeLoader>getAllTypeLoaders()java.util.Set<? extends java.lang.CharSequence>getAllTypeNames()Returns all type names in the system for all type loaders.ITypegetBoxType(IType primitiveType)ITypegetByFullName(java.lang.String fullyQualifiedName)Gets an intrinsic type based on a fully-qualified name.ITypegetByFullNameIfValid(java.lang.String fullyQualifiedName)Gets a type based on a fully-qualified name.private ITypegetByFullNameIfValid(java.lang.String fullyQualifiedName, boolean skipJava)ITypegetByFullNameIfValidNoJava(java.lang.String fullyQualifiedName)ITypegetByRelativeName(java.lang.String relativeName)ITypegetByRelativeName(java.lang.String relativeName, ITypeUsesMap typeUses)Gets an intrinsic type based on a relative name.ISymbolTablegetCompiledGosuClassSymbolTable()ITypegetCompilingType(java.lang.String strName)ITypegetComponentType(IType valueType)ITypegetCompoundType(java.util.Set<IType> types)ITypegetCurrentCompilingType()ModulegetCurrentModule()private ModuleTypeLoadergetCurrentModuleTypeLoader()ITypegetDefaultParameterizedType(IType type)ITypegetDefaultParameterizedTypeWithTypeVars(IType type)IMetaTypegetDefaultType()ITypegetDefaultType(java.lang.String name)IDefaultTypeLoadergetDefaultTypeLoader()(package private) java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter>getDefaultTypes()private static voidgetDefaultTypes(java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter> typeMap)IErrorTypegetErrorType()IErrorTypegetErrorType(ParseResultsException pe)IErrorTypegetErrorType(java.lang.String strErrantName)private static ExecutionEnvironmentgetExecutionEnv()IExecutionEnvironmentgetExecutionEnvironment()IExecutionEnvironmentgetExecutionEnvironment(IProject project)ITypegetExpandableComponentType(IType type)ITypegetFromObject(java.lang.Object object)Returns the intrinsic type for the given Object.ITypegetFunctionalInterface(IFunctionType type)private ModuleTypeLoadergetGlobalModuleTypeLoader()IGosuClassLoadergetGosuClassLoader()ITypegetIntrinsicTypeByFullName(java.lang.String fullyQualifiedName)ITypegetIntrinsicTypeFromObject(java.lang.Object object)ITypegetJavaType(java.lang.Class javaClass)private java.util.List<ITypeLoaderListener>getListeners()java.lang.StringgetNameOfParams(IType[] paramTypes, boolean bRelative, boolean bWithEnclosingType)INamespaceTypegetNamespace(java.lang.String strFqNamespace)java.util.Set<java.lang.String>getNamespacesFromTypeNames(java.util.Set<? extends java.lang.CharSequence> allTypeNames, java.util.Set<java.lang.String> namespaces)java.lang.StringgetNameWithQualifiedTypeVariables(IType type)IFunctionTypegetOrCreateFunctionType(IMethodInfo mi)IFunctionTypegetOrCreateFunctionType(java.lang.String strFunctionName, IType retType, IType[] paramTypes)ITypeRefgetOrCreateTypeReference(IType type)ITypeVariableTypegetOrCreateTypeVariableType(java.lang.String strName, IType boundingType, IType enclosingType)ITypegetPrimitiveType(IType boxType)IJavaTypegetPrimitiveType(java.lang.String name)intgetRefreshChecksum()intgetSingleRefreshChecksum()ISymbolTablegetSymTableCtx()private ITypeRefgetTopLevelType(IType type)ITypegetTypeByRelativeNameIfValid_NoGenerics(java.lang.String relativeName, ITypeUsesMap typeUses)ITypegetTypeFromObject(java.lang.Object obj)<T extends ITypeLoader>
TgetTypeLoader(java.lang.Class<? extends T> loaderType, IModule module)ITypeRefgetTypeReference(IType type)java.lang.String[]getTypesForFile(IModule module, IFile file)private booleanhasListener(ITypeLoaderListener l)voidincrementChecksums()voidinferTypeVariableTypesFromGenParamTypeAndConcreteType(IType genParamType, IType argType, TypeVarToTypeMap map)voidinferTypeVariableTypesFromGenParamTypeAndConcreteType_Reverse(IType genParamType, IType argType, TypeVarToTypeMap map)private voidinitBoxMapsIfNeeded()static TypeLoaderAccessinstance()private booleanisDefaultType(java.lang.String fqn)booleanisExpandable(IType type)booleanisIncludeAll()booleanisParameterizedWith(IType type, ITypeVariableType... typeVars)private booleanisValidTypeName(java.lang.String fqn)IGosucmakeGosucCompiler(java.lang.String gosucProjectFile, ICustomParser custParser)private voidmapBoxType(IType boxType, IType primitiveType)TypeVarToTypeMapmapTypeByVarName(IType ownersType, IType declaringType)ITypeparseType(java.lang.String typeString)Converts a String name of a type into an IType.ITypeparseType(java.lang.String typeString, ITypeUsesMap typeUsesMap)ITypeparseType(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName)ITypeparseType(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName, ITypeUsesMap typeUsesMap)ITypeLiteralExpressionparseTypeExpression(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName, ITypeUsesMap typeUsesMap)voidpopCompilingType()voidpopIncludeAll()voidpopModule(IModule module)voidpopSymTableCtx()voidpushCompilingType(IType type)voidpushIncludeAll()voidpushModule(IModule module)voidpushSymTableCtx(ISymbolTable ctx)voidpushTypeLoader(ITypeLoader loader)voidpushTypeLoader(IModule module, ITypeLoader typeLoader)voidrefresh(boolean clearCachedTypes)voidrefresh(ITypeRef typeRef)voidrefresh(IModule module)voidrefreshed(IResource file, java.lang.String typeName, RefreshKind refreshKind)voidrefreshTypes(RefreshRequest request)voidremoveTypeLoader(java.lang.Class<? extends ITypeLoader> loaderType)voidremoveTypeLoaderListener(ITypeLoaderListener l)ITypereplaceTypeVariableTypeParametersWithBoundingTypes(IType type, IType enclosingType)private <E,A>
EreturnFirstNonNull(TypeLoaderAccess.ArgCallable<E,A> callable, A argument)voidshutdown()private java.lang.Stringunproxy(java.lang.String fqn)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gw.plugin.IPluginHost
getInterface
-
-
-
-
Field Detail
-
PRIMITIVE_TYPES_BY_NAME
public static LockingLazyVar<java.util.Map<java.lang.String,IJavaType>> PRIMITIVE_TYPES_BY_NAME
-
EMPTY_DEFAULT_TYPES
private static final java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter> EMPTY_DEFAULT_TYPES
-
g_moduleStack
private static final java.lang.ThreadLocal<java.util.ArrayList<IModule>> g_moduleStack
-
_iRefreshChecksum
private int _iRefreshChecksum
-
_iSingleRefreshChecksum
private int _iSingleRefreshChecksum
-
_defaultTypes
private java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter> _defaultTypes
-
_defaultTypesIniting
private boolean _defaultTypesIniting
-
_listeners
private final java.util.concurrent.CopyOnWriteArrayList<java.lang.ref.WeakReference<ITypeLoaderListener>> _listeners
-
_shutdownListeners
private final java.util.List<TypeSystemShutdownListener> _shutdownListeners
-
getNamespaceTypeIfValid_Callable
private final TypeLoaderAccess.ArgCallable<IType,java.lang.String> getNamespaceTypeIfValid_Callable
-
getIntrinsicTypeFromObject_Callable
private final TypeLoaderAccess.ArgCallable<IType,java.lang.Object> getIntrinsicTypeFromObject_Callable
-
-
Method Detail
-
instance
public static TypeLoaderAccess instance()
-
getCurrentModuleTypeLoader
private ModuleTypeLoader getCurrentModuleTypeLoader()
-
getCurrentModule
public Module getCurrentModule()
- Specified by:
getCurrentModulein interfaceITypeSystem
-
pushModule
public void pushModule(IModule module)
- Specified by:
pushModulein interfaceITypeSystem
-
popModule
public void popModule(IModule module)
- Specified by:
popModulein interfaceITypeSystem
-
makeGosucCompiler
public IGosuc makeGosucCompiler(java.lang.String gosucProjectFile, ICustomParser custParser)
- Specified by:
makeGosucCompilerin interfaceITypeSystem
-
getDefaultType
public IType getDefaultType(java.lang.String name)
-
isParameterizedWith
public boolean isParameterizedWith(IType type, ITypeVariableType... typeVars)
- Specified by:
isParameterizedWithin interfaceITypeSystem
-
getCompoundType
public IType getCompoundType(java.util.Set<IType> types)
- Specified by:
getCompoundTypein interfaceITypeSystem
-
getDefaultTypes
java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter> getDefaultTypes()
-
getAllTypeLoaders
public java.util.List<ITypeLoader> getAllTypeLoaders()
- Specified by:
getAllTypeLoadersin interfaceITypeSystem
-
pushTypeLoader
public void pushTypeLoader(IModule module, ITypeLoader typeLoader)
- Specified by:
pushTypeLoaderin interfaceITypeSystem
-
removeTypeLoader
public void removeTypeLoader(java.lang.Class<? extends ITypeLoader> loaderType)
- Specified by:
removeTypeLoaderin interfaceITypeSystem
-
getListeners
private java.util.List<ITypeLoaderListener> getListeners()
-
getTypeReference
public ITypeRef getTypeReference(IType type)
- Specified by:
getTypeReferencein interfaceITypeSystem
-
getOrCreateTypeReference
public ITypeRef getOrCreateTypeReference(IType type)
- Specified by:
getOrCreateTypeReferencein interfaceITypeSystem
-
getTypeLoader
public <T extends ITypeLoader> T getTypeLoader(java.lang.Class<? extends T> loaderType, IModule module)
- Specified by:
getTypeLoaderin interfaceITypeSystem
-
getNamespace
public INamespaceType getNamespace(java.lang.String strFqNamespace)
- Specified by:
getNamespacein interfaceITypeSystem
-
getIntrinsicTypeFromObject
public IType getIntrinsicTypeFromObject(java.lang.Object object)
-
getIntrinsicTypeByFullName
public IType getIntrinsicTypeByFullName(java.lang.String fullyQualifiedName) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
getByRelativeName
public IType getByRelativeName(java.lang.String relativeName, ITypeUsesMap typeUses) throws java.lang.ClassNotFoundException
Gets an intrinsic type based on a relative name. This could either be the name of an entity, like "User", the name of a typekey, like "SystemPermission", or a class name, like "java.lang.String" (relative and fully qualified class names are the same as far as this factory is concerned). Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported.- Specified by:
getByRelativeNamein interfaceITypeSystem- Parameters:
relativeName- the relative name of the typetypeUses- the map of used types to use when resolving- Returns:
- the corresponding IType
- Throws:
java.lang.ClassNotFoundException- if the specified name doesn't correspond to any type
-
getTypeByRelativeNameIfValid_NoGenerics
public IType getTypeByRelativeNameIfValid_NoGenerics(java.lang.String relativeName, ITypeUsesMap typeUses)
-
getAllTypeNames
public java.util.Set<? extends java.lang.CharSequence> getAllTypeNames()
Description copied from interface:ITypeSystemReturns all type names in the system for all type loaders.- Specified by:
getAllTypeNamesin interfaceITypeSystem- Returns:
- all type names in the system.
-
clearErrorTypes
public void clearErrorTypes()
- Specified by:
clearErrorTypesin interfaceITypeSystem
-
refresh
public void refresh(boolean clearCachedTypes)
- Specified by:
refreshin interfaceITypeSystem
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceITypeSystem
-
refreshTypes
public void refreshTypes(RefreshRequest request)
-
getGlobalModuleTypeLoader
private ModuleTypeLoader getGlobalModuleTypeLoader()
-
addGosuProxyClass
private void addGosuProxyClass(IdentitySet<ITypeRef> allTypes, IType type)
-
getRefreshChecksum
public int getRefreshChecksum()
- Specified by:
getRefreshChecksumin interfaceITypeSystem
-
getSingleRefreshChecksum
public int getSingleRefreshChecksum()
- Specified by:
getSingleRefreshChecksumin interfaceITypeSystem
-
addTypeLoaderListenerAsWeakRef
public void addTypeLoaderListenerAsWeakRef(ITypeLoaderListener l)
Maintains weak refs to listeners. This is primarily so that tests don't accumulate a bunch of listeners over time. Otherwise this is a potential memory gobbler in tests.Note! Callers must manage the lifecycle of the listener, otherwise since this method creates a weak ref, it will be collected when it goes out of scope.
- Specified by:
addTypeLoaderListenerAsWeakRefin interfaceITypeSystem- Parameters:
l- Your type loader listener
-
removeTypeLoaderListener
public void removeTypeLoaderListener(ITypeLoaderListener l)
- Specified by:
removeTypeLoaderListenerin interfaceITypeSystem
-
hasListener
private boolean hasListener(ITypeLoaderListener l)
-
fireRefreshed
private void fireRefreshed()
-
incrementChecksums
public void incrementChecksums()
-
getExecutionEnv
private static ExecutionEnvironment getExecutionEnv()
-
returnFirstNonNull
private <E,A> E returnFirstNonNull(TypeLoaderAccess.ArgCallable<E,A> callable, A argument)
-
addShutdownListener
public void addShutdownListener(TypeSystemShutdownListener listener)
- Specified by:
addShutdownListenerin interfaceITypeSystem
-
getDefaultTypes
private static void getDefaultTypes(java.util.Map<java.lang.CharSequence,TypeLoaderAccess.TypeGetter> typeMap)
-
_getDefaultLoader
private static DefaultTypeLoader _getDefaultLoader()
-
get
public IType get(java.lang.Class<?> javaClass)
Gets the intrinsic type for a given class.
Note: you should use this method only if you do not have an Object of classjavaClassto get the type from. If you do have such an object, usegetFromObject(java.lang.Object)instead.- Specified by:
getin interfaceITypeSystem- Parameters:
javaClass- the Class to convert to an intrinsic type- Returns:
- the IType that corresponds to that class
- See Also:
getFromObject(Object)
-
unproxy
private java.lang.String unproxy(java.lang.String fqn)
-
computeFullyQualifiedName
private java.lang.String computeFullyQualifiedName(java.lang.Class<?> javaClass)
-
get
public IType get(IJavaClassInfo javaClassInfo)
Description copied from interface:ITypeSystemGets the intrinsic type for a given class info object.- Specified by:
getin interfaceITypeSystem- Parameters:
javaClassInfo- the Class info object to convert to an intrinsic type- Returns:
- the IType that corresponds to that class
-
getFromObject
public IType getFromObject(java.lang.Object object)
Returns the intrinsic type for the given Object.- Specified by:
getFromObjectin interfaceITypeSystem- Parameters:
object- the object to get an IType for- Returns:
- the IType for the object
- See Also:
get(Class)
-
getByRelativeName
public IType getByRelativeName(java.lang.String relativeName) throws java.lang.ClassNotFoundException
- Specified by:
getByRelativeNamein interfaceITypeSystem- Throws:
java.lang.ClassNotFoundException
-
getByFullName
public IType getByFullName(java.lang.String fullyQualifiedName)
Gets an intrinsic type based on a fully-qualified name. This could either be the name of an entity, like "entity.User", the name of a typekey, like "typekey.SystemPermission", or a class name, like "java.lang.String". Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported.- Specified by:
getByFullNamein interfaceITypeSystem- Parameters:
fullyQualifiedName- the fully qualified name of the type- Returns:
- the corresponding IType
- Throws:
java.lang.RuntimeException- if the specified name doesn't correspond to any type
-
getByFullNameIfValid
public IType getByFullNameIfValid(java.lang.String fullyQualifiedName)
Gets a type based on a fully-qualified name. This could either be the name of an entity, like "entity.User", the name of a typekey, like "typekey.SystemPermission", or a class name, like "java.lang.String". Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported. This method behaves the same as getByFullName except instead of throwing it returns null.- Specified by:
getByFullNameIfValidin interfaceITypeSystem- Parameters:
fullyQualifiedName- the fully qualified name of the type- Returns:
- the corresponding IType or null if the type does not exist
-
getByFullNameIfValidNoJava
public IType getByFullNameIfValidNoJava(java.lang.String fullyQualifiedName)
- Specified by:
getByFullNameIfValidNoJavain interfaceITypeSystem
-
getByFullNameIfValid
private IType getByFullNameIfValid(java.lang.String fullyQualifiedName, boolean skipJava)
-
isValidTypeName
private final boolean isValidTypeName(java.lang.String fqn)
-
isDefaultType
private boolean isDefaultType(java.lang.String fqn)
-
boundTypes
public IType boundTypes(IType targetType, java.util.List<IType> typesToBound)
- Specified by:
boundTypesin interfaceITypeSystem
-
refresh
public void refresh(ITypeRef typeRef)
- Specified by:
refreshin interfaceITypeSystem
-
dumpMaps
private void dumpMaps()
-
refresh
public void refresh(IModule module)
- Specified by:
refreshin interfaceITypeSystem
-
refreshed
public void refreshed(IResource file, java.lang.String typeName, RefreshKind refreshKind)
- Specified by:
refreshedin interfaceITypeSystem
-
getTypesForFile
public java.lang.String[] getTypesForFile(IModule module, IFile file)
- Specified by:
getTypesForFilein interfaceITypeSystem
-
parseType
public IType parseType(java.lang.String typeString) throws java.lang.IllegalArgumentException
Converts a String name of a type into an IType.- Specified by:
parseTypein interfaceITypeSystem- Throws:
java.lang.IllegalArgumentException- if the type string doesn't correspond to any known IType
-
parseType
public IType parseType(java.lang.String typeString, ITypeUsesMap typeUsesMap) throws java.lang.IllegalArgumentException
- Specified by:
parseTypein interfaceITypeSystem- Throws:
java.lang.IllegalArgumentException
-
parseType
public IType parseType(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName)
- Specified by:
parseTypein interfaceITypeSystem
-
parseType
public IType parseType(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName, ITypeUsesMap typeUsesMap)
- Specified by:
parseTypein interfaceITypeSystem
-
parseTypeExpression
public ITypeLiteralExpression parseTypeExpression(java.lang.String typeString, TypeVarToTypeMap actualParamByVarName, ITypeUsesMap typeUsesMap) throws ParseResultsException
- Specified by:
parseTypeExpressionin interfaceITypeSystem- Throws:
ParseResultsException
-
getComponentType
public IType getComponentType(IType valueType)
- Specified by:
getComponentTypein interfaceITypeSystem
-
getOrCreateTypeVariableType
public ITypeVariableType getOrCreateTypeVariableType(java.lang.String strName, IType boundingType, IType enclosingType)
- Specified by:
getOrCreateTypeVariableTypein interfaceITypeSystem
-
getOrCreateFunctionType
public IFunctionType getOrCreateFunctionType(IMethodInfo mi)
- Specified by:
getOrCreateFunctionTypein interfaceITypeSystem
-
getOrCreateFunctionType
public IFunctionType getOrCreateFunctionType(java.lang.String strFunctionName, IType retType, IType[] paramTypes)
- Specified by:
getOrCreateFunctionTypein interfaceITypeSystem
-
mapTypeByVarName
public TypeVarToTypeMap mapTypeByVarName(IType ownersType, IType declaringType)
- Specified by:
mapTypeByVarNamein interfaceITypeSystem
-
getActualType
public IType getActualType(IType type, TypeVarToTypeMap actualParamByVarName, boolean bKeepTypeVars)
- Specified by:
getActualTypein interfaceITypeSystem
-
inferTypeVariableTypesFromGenParamTypeAndConcreteType
public void inferTypeVariableTypesFromGenParamTypeAndConcreteType(IType genParamType, IType argType, TypeVarToTypeMap map)
- Specified by:
inferTypeVariableTypesFromGenParamTypeAndConcreteTypein interfaceITypeSystem
-
inferTypeVariableTypesFromGenParamTypeAndConcreteType_Reverse
public void inferTypeVariableTypesFromGenParamTypeAndConcreteType_Reverse(IType genParamType, IType argType, TypeVarToTypeMap map)
- Specified by:
inferTypeVariableTypesFromGenParamTypeAndConcreteType_Reversein interfaceITypeSystem
-
getErrorType
public IErrorType getErrorType()
- Specified by:
getErrorTypein interfaceITypeSystem
-
getErrorType
public IErrorType getErrorType(java.lang.String strErrantName)
- Specified by:
getErrorTypein interfaceITypeSystem
-
getErrorType
public IErrorType getErrorType(ParseResultsException pe)
- Specified by:
getErrorTypein interfaceITypeSystem
-
getDefaultTypeLoader
public IDefaultTypeLoader getDefaultTypeLoader()
- Specified by:
getDefaultTypeLoaderin interfaceITypeSystem
-
findParameterizedType
public IType findParameterizedType(IType type, IType rhsType)
- Specified by:
findParameterizedTypein interfaceITypeSystem
-
getNamespacesFromTypeNames
public java.util.Set<java.lang.String> getNamespacesFromTypeNames(java.util.Set<? extends java.lang.CharSequence> allTypeNames, java.util.Set<java.lang.String> namespaces)- Specified by:
getNamespacesFromTypeNamesin interfaceITypeSystem
-
pushTypeLoader
public void pushTypeLoader(ITypeLoader loader)
- Specified by:
pushTypeLoaderin interfaceITypeSystem
-
pushIncludeAll
public void pushIncludeAll()
- Specified by:
pushIncludeAllin interfaceITypeSystem
-
popIncludeAll
public void popIncludeAll()
- Specified by:
popIncludeAllin interfaceITypeSystem
-
isIncludeAll
public boolean isIncludeAll()
- Specified by:
isIncludeAllin interfaceITypeSystem
-
getCurrentCompilingType
public IType getCurrentCompilingType()
- Specified by:
getCurrentCompilingTypein interfaceITypeSystem
-
pushCompilingType
public void pushCompilingType(IType type)
- Specified by:
pushCompilingTypein interfaceITypeSystem
-
popCompilingType
public void popCompilingType()
- Specified by:
popCompilingTypein interfaceITypeSystem
-
getCompilingType
public IType getCompilingType(java.lang.String strName)
- Specified by:
getCompilingTypein interfaceITypeSystem
-
pushSymTableCtx
public void pushSymTableCtx(ISymbolTable ctx)
- Specified by:
pushSymTableCtxin interfaceITypeSystem
-
popSymTableCtx
public void popSymTableCtx()
- Specified by:
popSymTableCtxin interfaceITypeSystem
-
getSymTableCtx
public ISymbolTable getSymTableCtx()
- Specified by:
getSymTableCtxin interfaceITypeSystem
-
getTypeFromObject
public IType getTypeFromObject(java.lang.Object obj)
- Specified by:
getTypeFromObjectin interfaceITypeSystem
-
isExpandable
public boolean isExpandable(IType type)
- Specified by:
isExpandablein interfaceITypeSystem
-
getNameOfParams
public java.lang.String getNameOfParams(IType[] paramTypes, boolean bRelative, boolean bWithEnclosingType)
- Specified by:
getNameOfParamsin interfaceITypeSystem
-
getCompiledGosuClassSymbolTable
public ISymbolTable getCompiledGosuClassSymbolTable()
- Specified by:
getCompiledGosuClassSymbolTablein interfaceITypeSystem
-
getJavaType
public IType getJavaType(java.lang.Class javaClass)
- Specified by:
getJavaTypein interfaceITypeSystem
-
getNameWithQualifiedTypeVariables
public java.lang.String getNameWithQualifiedTypeVariables(IType type)
- Specified by:
getNameWithQualifiedTypeVariablesin interfaceITypeSystem
-
getDefaultParameterizedType
public IType getDefaultParameterizedType(IType type)
- Specified by:
getDefaultParameterizedTypein interfaceITypeSystem
-
getDefaultParameterizedTypeWithTypeVars
public IType getDefaultParameterizedTypeWithTypeVars(IType type)
- Specified by:
getDefaultParameterizedTypeWithTypeVarsin interfaceITypeSystem
-
canCast
public boolean canCast(IType lhsType, IType rhsType)
- Specified by:
canCastin interfaceITypeSystem
-
canCastCompountType
private boolean canCastCompountType(ICompoundType lhsType, IType rhsType)
-
getPrimitiveType
public IJavaType getPrimitiveType(java.lang.String name)
- Specified by:
getPrimitiveTypein interfaceITypeSystem
-
getPrimitiveType
public IType getPrimitiveType(IType boxType)
- Specified by:
getPrimitiveTypein interfaceITypeSystem
-
getBoxType
public IType getBoxType(IType primitiveType)
- Specified by:
getBoxTypein interfaceITypeSystem
-
getExpandableComponentType
public IType getExpandableComponentType(IType type)
- Specified by:
getExpandableComponentTypein interfaceITypeSystem
-
initBoxMapsIfNeeded
private void initBoxMapsIfNeeded()
-
getExecutionEnvironment
public IExecutionEnvironment getExecutionEnvironment()
- Specified by:
getExecutionEnvironmentin interfaceITypeSystem
-
getExecutionEnvironment
public IExecutionEnvironment getExecutionEnvironment(IProject project)
- Specified by:
getExecutionEnvironmentin interfaceITypeSystem
-
getGosuClassLoader
public IGosuClassLoader getGosuClassLoader()
- Specified by:
getGosuClassLoaderin interfaceITypeSystem
-
dumpGosuClassLoader
public void dumpGosuClassLoader()
- Specified by:
dumpGosuClassLoaderin interfaceITypeSystem
-
replaceTypeVariableTypeParametersWithBoundingTypes
public IType replaceTypeVariableTypeParametersWithBoundingTypes(IType type, IType enclosingType)
- Specified by:
replaceTypeVariableTypeParametersWithBoundingTypesin interfaceITypeSystem
-
getDefaultType
public IMetaType getDefaultType()
- Specified by:
getDefaultTypein interfaceITypeSystem
-
getFunctionalInterface
public IType getFunctionalInterface(IFunctionType type)
- Specified by:
getFunctionalInterfacein interfaceITypeSystem
-
-