static IMethodInfo getMethodInfo( IType rootType, String funcName, IType[] params ) { ITypeInfo typeInfo = rootType.getTypeInfo(); if( typeInfo instanceof IRelativeTypeInfo ) { return ((IRelativeTypeInfo)typeInfo).getMethod( rootType, funcName, params ); } else { return typeInfo.getMethod( funcName, params ); } }
static IMethodInfo getMethodInfo( IType rootType, String funcName, IType[] params ) { ITypeInfo typeInfo = rootType.getTypeInfo(); if( typeInfo instanceof IRelativeTypeInfo ) { return ((IRelativeTypeInfo)typeInfo).getMethod( rootType, funcName, params ); } else { return typeInfo.getMethod( funcName, params ); } }
public static void invokeLockMethod( Object o ) { if( o != null ) { IMethodInfo iMethodInfo = TypeSystem.getFromObject( o ).getTypeInfo().getMethod( "lock" ); if( iMethodInfo != null ) { iMethodInfo.getCallHandler().handleCall( o ); } } }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication parse( java.io.File file ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.io.File.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { file } ); }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication parse( java.io.InputStream inputStream ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.io.InputStream.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { inputStream } ); }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication parse( java.io.Reader reader ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.io.Reader.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { reader } ); }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Locale parse( java.net.URL url ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Locale) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.net.URL.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { url } ); }
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 gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication parse( java.io.Reader reader, gw.xml.XmlParseOptions options ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.io.Reader.class ), gw.lang.reflect.TypeSystem.get( gw.xml.XmlParseOptions.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { reader, options } ); }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication parse( java.lang.String xmlString, gw.xml.XmlParseOptions options ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Authentication) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( java.lang.String.class ), gw.lang.reflect.TypeSystem.get( gw.xml.XmlParseOptions.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { xmlString, options } ); }
public static gw.internal.schema.gw.xsd.guidewire.soapheaders.Locale parse( byte[] byteArray, gw.xml.XmlParseOptions options ) { //noinspection RedundantArrayCreation return (gw.internal.schema.gw.xsd.guidewire.soapheaders.Locale) TYPE.get().getTypeInfo().getMethod( "parse", gw.lang.reflect.TypeSystem.get( byte[].class ), gw.lang.reflect.TypeSystem.get( gw.xml.XmlParseOptions.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { byteArray, options } ); }
@Override public IMethodInfo getWriteMethodInfo() { IJavaClassMethod method = getPropertyDescriptor().getWriteMethod(); if (method != null) { return getOwnersType().getTypeInfo().getMethod(method.getName(), getTypesFromClasses(method.getParameterTypes())); } return null; }
@Override public IMethodInfo getReadMethodInfo() { IJavaClassMethod method = getPropertyDescriptor().getReadMethod(); if (method != null) { return getOwnersType().getTypeInfo().getMethod(method.getName(), getTypesFromClasses(method.getParameterTypes())); } return null; }
public void setMethodDescriptor(IMethodInfo md) { _md = md; if (md != null) { IType type = JavaTypes.IGOSU_OBJECT(); if (_md.getOwnersType() == IGosuClassInternal.Util.getGosuClassFrom(type)) { _md = type.getTypeInfo().getMethod(_md.getDisplayName(), ((FunctionType) ((IGosuMethodInfo) _md).getDfs().getType()).getParameterTypes()); } } }
@Override public IMethodInfo getReadMethodInfo() { IJavaClassMethod method = getPropertyDescriptor().getReadMethod(); if( method != null ) { ITypeInfo ti = getOwnersType().getTypeInfo(); return ti instanceof IRelativeTypeInfo ? ((IRelativeTypeInfo)ti).getMethod( getOwnersType(), method.getName(), getTypesFromClasses( method.getParameterTypes() ) ) : ti.getMethod( method.getName(), getTypesFromClasses( method.getParameterTypes() ) ); } return null; }
@Override public IMethodInfo getWriteMethodInfo() { IJavaClassMethod method = getPropertyDescriptor().getWriteMethod(); if( method != null ) { ITypeInfo ti = getOwnersType().getTypeInfo(); return ti instanceof IRelativeTypeInfo ? ((IRelativeTypeInfo)ti).getMethod( getOwnersType(), method.getName(), getTypesFromClasses( method.getParameterTypes() ) ) : ti.getMethod( method.getName(), getTypesFromClasses( method.getParameterTypes() ) ); } return null; }
private void implementToString() { Identifier thisId = new Identifier(); thisId.setSymbol( new Symbol( Keyword.KW_this.getName(), this, null ), new StandardSymbolTable() ); thisId.setType( this ); BeanMethodCallExpression toStrCall = new BeanMethodCallExpression(); toStrCall.setMethodDescriptor( JavaTypes.IBLOCK().getTypeInfo().getMethod( "toString" ) ); toStrCall.setRootExpression( thisId ); toStrCall.setType( JavaTypes.STRING() ); ReturnStatement returnStmt = new ReturnStatement(); returnStmt.setValue( toStrCall ); }
private void implementToString() { Identifier thisId = new Identifier(); thisId.setSymbol( new Symbol( Keyword.KW_this.getName(), this, null ), new StandardSymbolTable() ); thisId.setType( this ); BeanMethodCallExpression toStrCall = new BeanMethodCallExpression(); toStrCall.setMethodDescriptor( JavaTypes.IBLOCK().getTypeInfo().getMethod( "toString" ) ); toStrCall.setRootExpression( thisId ); toStrCall.setType( JavaTypes.STRING() ); ReturnStatement returnStmt = new ReturnStatement(); returnStmt.setValue( toStrCall ); }
public GosuObjectFunctionSymbol( IGosuClassInternal gsClass, DynamicFunctionSymbol dfs ) { super( dfs.getSymbolTable(), dfs.getDisplayName(), (IFunctionType)dfs.getType(), dfs.getArgs(), new SyntheticFunctionStatement() ); SyntheticFunctionStatement stmt = (SyntheticFunctionStatement)getValueDirectly(); stmt.setDfsOwner( this ); setClassMember( true ); setName( (String)dfs.getName() ); _scriptPartId = new ScriptPartId( gsClass, null ); _mi = JavaTypes.IGOSU_OBJECT().getTypeInfo().getMethod( dfs.getDisplayName(), ((IFunctionType)dfs.getType()).getParameterTypes() ); }
public GosuObjectFunctionSymbol( IGosuClassInternal gsClass, DynamicFunctionSymbol dfs ) { super( dfs.getSymbolTable(), dfs.getDisplayName(), (IFunctionType)dfs.getType(), dfs.getArgs(), new SyntheticFunctionStatement() ); SyntheticFunctionStatement stmt = (SyntheticFunctionStatement)getValueDirectly(); stmt.setDfsOwner( this ); setClassMember( true ); setName( (String)dfs.getName() ); _scriptPartId = new ScriptPartId( gsClass, null ); _mi = JavaTypes.IGOSU_OBJECT().getTypeInfo().getMethod( dfs.getDisplayName(), ((IFunctionType)dfs.getType()).getParameterTypes() ); }