public IJavaType init() { IJavaType type = (IJavaType) TypeSystem.getByFullNameIfValid( RootType.class.getName().replace('$', '.'), TypeSystem.getGlobalModule() ); if( type == null ) { throw new RuntimeException( "Cannot load gw.internal.gosu.parser.MetaType.RootType. The TypeSystem is not setup properly. It's highly likely Gosu is not in your classpath (perhaps via the project SDK)." ); } return type; } };
public IType getExceptionType() { return TypeSystem.getByFullNameIfValid( getName() ); } }
public IJavaType init() { return (IJavaType) TypeSystem.getByFullNameIfValid( Object.class.getName(), TypeSystem.getGlobalModule() ); } };
public IType getExceptionType() { return TypeSystem.getByFullNameIfValid( getName() ); } }
public IType getType() { String fqn = makeFqn(); if( fqn == null ) { return null; } return TypeSystem.getByFullNameIfValid( fqn ); }
public IType getExceptionType() { return TypeSystem.getByFullNameIfValid( getName() ); } }
private static IJavaType getFunctionType( int arity, String s ) { if( arity >= 0 && arity <= IBlock.MAX_ARGS ) { String functionTypeName = s + arity; return (IJavaType) TypeSystem.getByFullNameIfValid(functionTypeName, TypeSystem.getGlobalModule()); } return null; }
@Override protected void doInit() { _keyType = TypeSystem.getByFullNameIfValid("gw.pl.persistence.core.Key", TypeSystem.getGlobalModule()); _beanType = TypeSystem.getByFullNameIfValid("gw.pl.persistence.core.Bean", TypeSystem.getGlobalModule()); _typekeyType = TypeSystem.getByFullNameIfValid("gw.entity.TypeKey", TypeSystem.getGlobalModule()); _entityType = TypeSystem.getByFullNameIfValid("gw.entity.IEntityType", TypeSystem.getGlobalModule()); _typelistType = TypeSystem.getByFullNameIfValid("gw.entity.ITypeList", TypeSystem.getGlobalModule()); }
public String getFilePath() { IFileRepositoryBasedType enclosingType = (IFileRepositoryBasedType) TypeSystem.getByFullNameIfValid(_strEnclosingType); return enclosingType == null ? null : enclosingType.getSourceFileHandle().getFilePath(); }
@Override public IFile getFile() { IFileRepositoryBasedType enclosingType = (IFileRepositoryBasedType) TypeSystem.getByFullNameIfValid(_strEnclosingType); return enclosingType.getSourceFileHandle().getFile(); }
public IType getSelfType() { IType byFullNameIfValid = TypeSystem.getByFullNameIfValid(getNamespace()); if (byFullNameIfValid instanceof JSchemaType) { return ((JSchemaType) byFullNameIfValid).getSelfType(); } else if (byFullNameIfValid == null) { return this; } else { return null; } }
private static void processSingleImport(String typeName, DependencySink sink) { final IType type = TypeSystem.getByFullNameIfValid(typeName); if (type != null && !(type instanceof INamespaceType)) { sink.addType(type); processPackageSegment(typeName, sink); } }
public boolean isValid() { IHasInnerClass enclosingType = (IHasInnerClass)TypeSystem.getByFullNameIfValid( _strEnclosingType ); return enclosingType != null && enclosingType.getInnerClass( getRelativeName() ) != null; }
private boolean isCompilable( IType type ) { IType doNotVerifyAnnotation = TypeSystem.getByFullNameIfValid( "gw.testharness.DoNotVerifyResource" ); return type instanceof IGosuClass && !type.getTypeInfo().hasAnnotation( doNotVerifyAnnotation ); }
@Override public IFile getFile() { IFileRepositoryBasedType enclosingType = (IFileRepositoryBasedType) TypeSystem.getByFullNameIfValid(_strEnclosingType); return enclosingType.getSourceFileHandle().getFile(); }
private static boolean isContravariantWildcardOnFunctionalInterface( AsmWildcardType typeArg, String fqn ) { IType genType = TypeSystem.getByFullNameIfValid( fqn ); return !typeArg.isCovariant() && genType instanceof IJavaType && FunctionToInterfaceCoercer.getSingleMethodFromJavaInterface( (IJavaType)genType ) != null; }
@Override public boolean isStandardPath() { IFileRepositoryBasedType enclosingType = (IFileRepositoryBasedType) TypeSystem.getByFullNameIfValid(_strEnclosingType); return enclosingType.getSourceFileHandle().isStandardPath(); }
public static IType getByFullNameIfValid(String typeName, IModule module) { TypeSystem.pushModule(module); try { return getByFullNameIfValid(typeName); } finally { TypeSystem.popModule(module); } }
@Override public void configure() { setText( getDisplayText( getNode() ) ); setIcon( EditorUtilities.findIcon( TypeSystem.getByFullNameIfValid( getNode().toString() ) ) ); }
private boolean maybeUseLowerBoundForFunctionalInterface() { if( !((AsmWildcardType)getType()).isCovariant() ) { if( FunctionToInterfaceCoercer.getSingleMethodFromJavaInterface( (IJavaType)TypeSystem.getByFullNameIfValid( _genType.getName(), getModule() ) ) != null ) { // Functional interfaces parameterized with ? super T wildcard type keep T so contravariance works with blocks return true; } } return false; }