All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.lang.ir.builder.IRBuilder Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
/*
 * Copyright 2014 Guidewire Software, Inc.
 */

package gw.lang.ir.builder;

import gw.lang.ir.IRType;
import gw.lang.GosuShop;
import gw.lang.UnstableAPI;
import gw.lang.reflect.IType;
import gw.lang.reflect.java.IJavaClassInfo;

import java.util.List;
import java.util.ArrayList;

@UnstableAPI
public abstract class IRBuilder {

  // ------------------------ Protected Helper Methods

  protected final IRType getIRType( Class cls ) {
    return GosuShop.getIRTypeResolver().getDescriptor( cls );
  }

  protected final IRType getIRType( IType type ) {
    return GosuShop.getIRTypeResolver().getDescriptor( type );
  }

  protected final IRType getIRType( IJavaClassInfo cls ) {
    return GosuShop.getIRTypeResolver().getDescriptor( cls );
  }

  protected final List getIRTypes( Class[] classes ) {
    List results = new ArrayList();
    for (Class cls : classes) {
      results.add( getIRType( cls ) );
    }
    return results;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy