public ScriptPartId( IType type, String strPartId ) { _type = type; _typeName = type == null ? null : type.getName(); _strPartId = strPartId; }
private String getJavadocURLPrefix( IType type ) { String typeName = type.getName(); int i = typeName.indexOf( '.' ); return JAVADOC_URL_BY_PREFIXES.get( typeName.substring( 0, i + 1 ) ); }
private void writeObject(ObjectOutputStream os) throws IOException { os.writeObject(_getTypeName()); os.writeBoolean(_bParameterized); os.writeObject(_componentType == null ? null : _componentType.getName()); os.writeObject(_pureGenericTypeName); os.writeInt(_typeParameters == null ? 0 : _typeParameters.length); if (_typeParameters != null) { for (int i = 0; i < _typeParameters.length; i++) { os.writeObject(_typeParameters[i].getName()); } } }
public String getNamespace() { IType enclosingType = getEnclosingType(); return enclosingType != null ? enclosingType.getName() : null; }
public LazyType( IType entryType ) { super(); _typeName = entryType.getName(); _typeUsesMap = null; initDirectly( entryType ); }
private String maybeCastReturnType( IMethodInfo mi, IType returnType, IType rootType ) { //## todo: return returnType != JavaTypes.pVOID() ? " as " + returnType.getName() : ""; }
private static String maybeCastReturnType( IType returnType ) { return returnType != JavaTypes.pVOID() ? " as " + returnType.getName() : ""; }
public void addEntry( IType enhancedType, IGosuEnhancement enhancement ) { ArrayList<String> enhancementIndexForType = getEnhancementIndexForType( enhancedType.getName() ); if( !enhancementIndexForType.contains( enhancement.getName() ) ) { enhancementIndexForType.add( enhancement.getName() ); } }
@Override public IAnnotationInfo getAnnotation( IType type ) { return ANNOTATION_HELPER.getAnnotation(type, getAnnotations(), type.getName()); }
/** * * @return will return _outputWrapperType _operationName(_inputWrapperType) */ public String toString() { return (_outputInfo.getReturnParameterInfo() != null ? _outputInfo.getReturnParameterInfo().getType().getName() : "void") + " " + _name + "(" + _inputInfo.getRequestElementType().getName() + ")"; }
@Override public void actionPerformed( ActionEvent e ) { editor.util.EditorUtilities.getClipboard().setContents( new StringSelection( type1.getName() ), null ); CopyBuffer.instance().captureState(); } } );
@Override public void actionPerformed( ActionEvent e ) { editor.util.EditorUtilities.getClipboard().setContents( new StringSelection( finalType.getName() ), null ); CopyBuffer.instance().captureState(); } } );
private String getTopLevelTypeName( IType type ) { while( type.getEnclosingType() != null ) { type = type.getEnclosingType(); } return type.getName(); }
public void clipCopyTypeInfoAtCurrentLocation() { IType type = getTypeAtCaretPosition(); if( type == null ) { return; } LabFrame.instance().getGosuPanel().getClipboard().setContents( new StringSelection( type.getName() ), null ); }
public static IRType get(IType type) { if (type instanceof IGosuClassInternal || type instanceof IGosuArrayClass) { return GosuClassIRType.get(type); } else if (type instanceof GosuFragment) { return new SyntheticIRType( FragmentInstance.class, type.getName(), type.getRelativeName()); } else if (type instanceof IJavaType) { return JavaClassIRType.get(((IJavaType) type).getBackingClassInfo()); } else { throw new IllegalArgumentException("Cannot create an IRType for " + type.getClass()); } } }
public IRunConfig getOrCreateRunConfig( IType type ) { String fqn = type.getName(); IRunConfig rc = findRunConfig( runConfig -> runConfig instanceof FqnRunConfig && ((FqnRunConfig)runConfig).getFqn().equals( fqn ) ); return rc == null ? EditorUtilities.isRunnable( type ) ? ProgramRunConfigFactory.instance().newRunConfig( makeProgramParams( type.getRelativeName(), type.getName() ) ) : null : rc; }
String computeQualifiedName() { if (isArray()) { IType cType = getComponentType(); return cType.getName() + "[]"; } else { String strName = _classInfo.getName().replace('$', '.'); if (isParameterizedType()) { strName += TypeLord.getNameOfParams(_typeParams, false, false); } return strName; } }
public String getNameWithBounds( boolean bRelative ) { return _boundingType == JavaTypes.OBJECT() ? getName() : (getName() + " " + Keyword.KW_extends + " " + (bRelative ? _boundingType.getRelativeName() : _boundingType.getName())); }
private static boolean hasMethod_Cached( IType type, String method ) { if( !type.isPrimitive() && (type instanceof IGosuClass || type instanceof IJavaType) ) { String name = TypeLord.getPureGenericType( type ).getName(); return BINDER_ASSIGNABILITY_CACHE.get( Pair.make( name, method ) ); } return false; }
private void maybeReplacePackageExprWithTypeLiteral( int iOffset, int iLineNum, int iColumn, Expression expr ) { if( expr instanceof Identifier && expr.getType() instanceof NamespaceType ) { String strNamespace = expr.getType().getName(); if( getNamespace() != null ) { popExpression(); // Pop existing expression; we're going to transform it to a type literal tryToMakeTypeLiteral( new String[] {strNamespace}, iOffset, iLineNum, iColumn, strNamespace, expr ); } } }