@Override public boolean isStatic() { return _terminalMethod.isStatic(); }
@Override public boolean isStatic() { return _terminalMethod.isStatic(); }
public boolean isStatic() { return _mi.isStatic(); }
public boolean isStatic() { return _delegate.isStatic(); }
public boolean isStatic() { return _mi.isStatic(); }
public boolean isStatic() { return _delegate.isStatic(); }
public boolean isStatic() { return !getSource().isStatic(); }
public boolean isStatic() { return !getSource().isStatic(); }
public boolean isStaticish() { if( _feature instanceof IMethodInfo ) { return ((IMethodInfo)_feature).isStatic(); } else if( _feature instanceof IPropertyInfo ) { return ((IPropertyInfo)_feature).isStatic(); } else { return _feature instanceof IConstructorInfo; } }
@Override protected Object evaluate( Iterator args ) { Object ctx = null; if (!_mi.isStatic()) { ctx = args.next(); } if( _boundValues != null ) { args = Arrays.asList( _boundValues ).iterator(); } Object[] argArray = new Object[_mi.getParameters().length]; for (int i = 0; i < argArray.length; i++) { argArray[i] = args.next(); } return _mi.getCallHandler().handleCall(ctx, argArray); }
@Override public List<IType> getFullArgTypes() { ArrayList<IType> argTypes = new ArrayList<IType>(); if (!_mi.isStatic()) { argTypes.add(_mi.getOwnersType()); } if( _boundValues == null ) { for (IParameterInfo iParameterInfo : _mi.getParameters()) { argTypes.add(iParameterInfo.getFeatureType()); } } return argTypes; }
@Override public List<IType> getFullArgTypes() { ArrayList<IType> argTypes = new ArrayList<IType>(); if (!_mi.isStatic()) { argTypes.add(_mi.getOwnersType()); } if( _boundValues == null ) { for (IParameterInfo iParameterInfo : _mi.getParameters()) { argTypes.add(iParameterInfo.getFeatureType()); } } return argTypes; }
private static boolean isTestMethod(IMethodInfo methodInfo) { return methodInfo.isPublic() && methodInfo.getParameters().length == 0 && !methodInfo.isStatic() && methodInfo.getName().startsWith("test"); } }
private void genMethodImpl( StringBuilder sb, IMethodInfo mi ) { if( mi.isPrivate() ) { return; } if( mi.isStatic() && mi.getDisplayName().indexOf( '$' ) < 0 ) { genStaticMethod( sb, mi ); } else { genMemberMethod( sb, mi ); } }
public static boolean isOperation( IMethodInfo method, IWsiWebMethod annotation ) { return method.isPublic() && !method.isHidden() && !method.getName().startsWith("@") && !method.isStatic() && ( annotation == null || !annotation.isExclude() ); }
public int getTotalNumTestMethods() { List<? extends IMethodInfo> methods = getType().getTypeInfo().getMethods(); int count = 0; for (IMethodInfo method : methods) { if (!method.isStatic() && method.getName().startsWith("test") && method.getParameters().length == 0) { count++; } } return count; }
private IMethodInfo hasStaticMain( IGosuClass gsType ) { IMethodInfo main = gsType.getTypeInfo().getMethod( "main", JavaTypes.STRING().getArrayType() ); if( main != null && main.isStatic() && main.getReturnType() == JavaTypes.pVOID() ) { return main; } return null; } }
private static IMethodInfo hasStaticMain( IType type ) { IMethodInfo main = type.getTypeInfo().getMethod( "main", JavaTypes.STRING().getArrayType() ); if( main != null && main.isStatic() && main.getReturnType() == JavaTypes.pVOID() ) { return main; } return null; }
public static Object invokeStaticMethod( String className, String methodName, Object... args ) { IType type = TypeSystem.getByFullName( className ); ensureTypeIsValid( type ); IType[] runtimeTypes = extractRuntimeTypes( args ); IMethodInfo info = findCallableMethod( methodName, runtimeTypes, type ); if( info != null && info.isStatic() ) { return info.getCallHandler().handleCall( type, coerceArgsIfNecessary( info.getParameters(), args ) ); } else { throw new IllegalArgumentException( "Unable to find a static method on " + type.getName() + " with name " + methodName + " and parameters compatible with arg types [" + GosuStringUtil.join( runtimeTypes, "," ) + "]"); } }
protected void mergeMethods(MethodList methods, IType type, boolean replace) { List<? extends IMethodInfo> methodInfos; if (type != null && !TypeSystem.isDeleted(type)) { if (type.getTypeInfo() instanceof IRelativeTypeInfo) { methodInfos = ((IRelativeTypeInfo) type.getTypeInfo()).getMethods( _typeInfo.getOwnersType()); } else { methodInfos = type.getTypeInfo().getMethods(); } for (IMethodInfo methodInfo : methodInfos) { if( !type.isInterface() || !methodInfo.isStatic() ) { // static interface methods are not inherited mergeMethod(methods, methodInfo, replace); } } } }