Package com.caucho.quercus.program

Examples of com.caucho.quercus.program.JavaClassDef$JavaEntry


                                                   String extension)
  {
    if (type.isArray())
      return new JavaArrayClassDef(this, className, type, extension);
    else
      return new JavaClassDef(this, className, type, extension);
  }
View Full Code Here


  public void introspectJavaClass(String name, Class type, String extension,
                                  Class javaClassDefClass)
    throws IllegalAccessException, InstantiationException, ConfigException,
           NoSuchMethodException, InvocationTargetException
  {
    JavaClassDef def = addClass(name, type, extension, javaClassDefClass);

    synchronized (_javaClassWrappers) {
      _javaClassWrappers.put(name, def);
      _javaClassWrappers.put(type.getName(), def);
      // _lowerJavaClassWrappers.put(name.toLowerCase(Locale.ENGLISH), def);
View Full Code Here

              type.getName(),
              extension));
    }

    try {
      JavaClassDef def = addClass(name, type, extension, null);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

  /**
   * Adds a java class
   */
  public JavaClassDef getJavaClassDefinition(String className)
  {
    JavaClassDef def;

    if (_classNotFoundCache.get(className) != null)
      return null;

    def = _javaClassWrappers.get(className);

    if (def == null) {
      try {
        def = getModuleContext().getJavaClassDefinition(className);

        _javaClassWrappers.put(className, def);
      } catch (RuntimeException e) {
        _classNotFoundCache.put(className, className);

        throw e;
      } catch (Exception e) {
        throw new QuercusRuntimeException(e);
      }
    }

    def.init();

    return def;
  }
View Full Code Here

  private void initClasses()
  {
    for (Map.Entry<String,JavaClassDef> entry
           : _moduleContext.getWrapperMap().entrySet()) {
      String name = entry.getKey();
      JavaClassDef def = entry.getValue();

      _javaClassWrappers.put(name, def);
      _lowerJavaClassWrappers.put(name.toLowerCase(Locale.ENGLISH), def);
    }
View Full Code Here

  /**
   * Adds a java class
   */
  public JavaClassDef getJavaClassDefinition(Class<?> type, String className)
  {
    JavaClassDef def;

    if (_classNotFoundCache.get(className) != null)
      return null;

    def = _javaClassWrappers.get(className);
   
    if (def == null || def.getType() != type) {
      try {
        def = getModuleContext().getJavaClassDefinition(type, className);

        int id = getClassId(className);
        _classDefMap[id] = def;

        _javaClassWrappers.put(className, def);
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        throw new QuercusRuntimeException(e);
      }
    }

    def.init();

    return def;
  }
View Full Code Here

  /**
   * Returns an introspected Java class definition.
   */
  public JavaClassDef getJavaClassDefinition(String className)
  {
    JavaClassDef def = getJavaClassDefinition(className, true);
   
    if (def != null)
      return def;
    else
      throw createErrorException(L.l("'{0}' class definition not found", className));
View Full Code Here

  /*
   * Returns an introspected Java class definition.
   */
  public JavaClassDef getJavaClassDefinition(Class type)
  {
    JavaClassDef def = _quercus.getJavaClassDefinition(type, type.getName());
   
    return def;
  }
View Full Code Here

  }
 
  private JavaClassDef getJavaClassDefinition(String className,
                                              boolean useImport)
  {
    JavaClassDef def = null;
   
    try {
      def = _quercus.getJavaClassDefinition(className);
     
      if (def == null && useImport) {
View Full Code Here

        = _importMap.getWildcardList();
 
      for (String entry : wildcardList) {
        fullName = entry + '.' + className;
         
        JavaClassDef def = getJavaClassDefinition(fullName, false);
       
        if (def != null) {
          _importMap.putQualified(className, fullName);
          return def;
        }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.program.JavaClassDef$JavaEntry

Copyright © 2018 www.massapicom. 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.