Examples of ClassFactory


Examples of net.sf.rej.java.ClassFactory

        }
      } catch(Exception ioe) {
        ioe.printStackTrace();
      }
    } else {
      ClassFactory factory = new ClassFactory();
      IReferenceType rt = sf.location().declaringType();
      String superClass = null;
      if (!"java.lang.Object".equals(rt.name())) {
        superClass = rt.getSuperClassName();
      }
      ClassFile cf = factory.createClass(rt.name(), superClass);
      ConstantPool cp = cf.getPool();
      FieldFactory fieldFactory = new FieldFactory();
      for (IField field : rt.visibleFields()) {
        AccessFlags flags = new AccessFlags(field.modifiers());
        Field fieldToAdd = fieldFactory.createField(cf, flags, cp.optionalAddUtf8(field.name()), cp.optionalAddUtf8(field.signature()));
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

      }

      TypeId typeId = columnDescriptor.getType().getTypeId();

      // Don't allow a column to be created on a non-orderable type
      ClassFactory cf = lcc.getLanguageConnectionFactory().getClassFactory();
      boolean isIndexable = typeId.orderable(cf);

      if (isIndexable && typeId.userType()) {
        String userClass = typeId.getCorrespondingJavaTypeName();

        // Don't allow indexes to be created on classes that
        // are loaded from the database. This is because recovery
        // won't be able to see the class and it will need it to
        // run the compare method.
        try {
          if (cf.isApplicationClass(cf.loadApplicationClass(userClass)))
            isIndexable = false;
        } catch (ClassNotFoundException cnfe) {
          // shouldn't happen as we just check the class is orderable
          isIndexable = false;
        }
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

    NoPutResultSet        inputResultSet 
  ) throws StandardException
  {
    GenericAggregator   aggregators[];
    Vector tmpAggregators = new Vector();
    ClassFactory    cf = lcc.getLanguageConnectionFactory().getClassFactory();

    int count = list.size();
    for (int i = 0; i < count; i++)
    {
      AggregatorInfo aggInfo = (AggregatorInfo) list.elementAt(i);
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

        continue;

      /*
      ** Check type compatability.
      */
      ClassFactory cf = getClassFactory();
      if ( !unionCompatible( thisExpr, otherExpr ) )
      {
        throw StandardException.newException(SQLState.LANG_NOT_UNION_COMPATIBLE,
                                                     thisTypeId.getSQLTypeName(),
                                                     otherTypeId.getSQLTypeName(),
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

    private boolean unionCompatible( ValueNode left, ValueNode right )
        throws StandardException
    {
        TypeId leftTypeId = left.getTypeId();
        TypeId rightTypeId = right.getTypeId();
        ClassFactory cf = getClassFactory();

        if (
            !left.getTypeCompiler().storable(rightTypeId, cf) &&
            !right.getTypeCompiler().storable(leftTypeId, cf)
            )
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

      /*
      ** Check type compatability.  We want to make sure that
      ** the types are assignable in either direction
      ** and they are comparable.
      */
      ClassFactory cf = getClassFactory();
      if (
        !thisExpr.getTypeCompiler().storable(otherTypeId, cf) &&
        !otherExpr.getTypeCompiler().storable(thisTypeId, cf))
      {
        throw StandardException.newException(SQLState.LANG_NOT_UNION_COMPATIBLE,
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

          SubqueryList    subqueryList,
          Vector        aggregateVector)
      throws StandardException
  {
    DataTypeDescriptor   dts = null;
    ClassFactory    cf;

    cf = getClassFactory();
    classInspector = cf.getClassInspector();

    instantiateAggDef();

    /* Add ourselves to the aggregateVector before we do anything else */
    aggregateVector.addElement(this);
 
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

            throw StandardException.newException(SQLState.LANG_FILE_ERROR, ioe, ioe.toString());   
    }
  }

  private void notifyLoader(boolean reload) throws StandardException {
    ClassFactory cf = lcc.getLanguageConnectionFactory().getClassFactory();
    cf.notifyModifyJar(reload);
  }
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

    throws StandardException
  {
    LanguageConnectionContext lcc =
      (LanguageConnectionContext) ContextService.getContext
                                          (LanguageConnectionContext.CONTEXT_ID);
    ClassFactory classFactory = lcc.getLanguageConnectionFactory().getClassFactory();

    GeneratedClass gc = classFactory.loadGeneratedClass(className, byteCode);

    /*
    ** No special try catch logic to write out bad classes
    ** here.  We don't expect any problems, and in any
    ** event, we don't have the class builder available
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.ClassFactory

    throws StandardException
  {
    LanguageConnectionContext lcc =
      (LanguageConnectionContext) ContextService.getContext
                                          (LanguageConnectionContext.CONTEXT_ID);
    ClassFactory classFactory = lcc.getLanguageConnectionFactory().getClassFactory();

    GeneratedClass gc = classFactory.loadGeneratedClass(className, byteCode);

    /*
    ** No special try catch logic to write out bad classes
    ** here.  We don't expect any problems, and in any
    ** event, we don't have the class builder available
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.