Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.ioc.services
Class ClassFabUtils

    java.lang.Object
      org.apache.tapestry5.ioc.services.ClassFabUtils

Deprecated. Deprecated in Tapestry 5.3, to be removed in 5.4 with no replacement

    public final class ClassFabUtils

extends java.lang.Object

Handy method useful when creating new classes using `ClassFab`.

Constructor Summary
`ClassFabUtils()` Deprecated.

Method Summary
`static java.lang.String` | `castReference(java.lang.String reference, java.lang.String desiredType)` Deprecated. Takes a reference and casts it to the desired type.
`static java.lang.String` | `generateClassName(java.lang.Class interfaceClass)` Deprecated. Returns a class name derived from the provided interfaceClass.
`static java.lang.String` | `generateClassName(java.lang.String baseName)` Deprecated. Generates a unique class name, which will be in the default package.
`static java.lang.String` | `getPathForClass(java.lang.Class clazz)` Deprecated. Given a Class instance, convert the name into a path that can be used to locate the underlying class file on the classpath.
`static java.lang.String` | `getPathForClassNamed(java.lang.String className)` Deprecated. Given a fully qualified class name, converts to a path on the classpath.
`static java.lang.Class` | `getPrimitiveType(java.lang.Class wrapperType)` Deprecated. Given a wrapper type, determines the corresponding primitive type.
`static java.lang.Class` | `getPrimitiveType(java.lang.String primitiveTypeName)` Deprecated.
`static java.lang.String` | `getTypeCode(java.lang.Class type)` Deprecated. Converts a Class to a JVM type code (the way class information is expressed in a class file).
`static java.lang.String` | `getUnwrapMethodName(java.lang.Class primitiveType)` Deprecated. Given a primitive type, finds the unwrap method of the corresponding wrapper type.
`static java.lang.Class` | `getWrapperType(java.lang.Class type)` Deprecated. Returns the wrapper type for an input type; for most types, this is the type.
`static boolean` | `isPrimitiveType(java.lang.String typeName)` Deprecated. Given a type name, determines if that is the name of a primitive type.
`static boolean` | `isToString(java.lang.reflect.Method method)` Deprecated. Returns true if the method is the standard toString() method.
`static java.lang.String` | `nextUID()` Deprecated.
`static java.io.File` | `toFileFromFileProtocolURL(java.net.URL url)` Deprecated. Converts a URL with protocol "file" to a File instance.
`static java.lang.String` | `toJavaClassName(java.lang.Class inputClass)` Deprecated. Javassist needs the class name to be as it appears in source code, even for arrays.
`static java.lang.String` | `toJVMBinaryName(java.lang.String type)` Deprecated. Translates types from standard Java format to Java VM format.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClassFabUtils

    public ClassFabUtils()

  Deprecated.

Method Detail

### nextUID

    public static java.lang.String nextUID()

  Deprecated.

### generateClassName

    public static java.lang.String generateClassName(java.lang.String baseName)

  Deprecated.
  Generates a unique class name, which will be in the default package.

### generateClassName

    public static java.lang.String generateClassName(java.lang.Class interfaceClass)

  Deprecated.
  Returns a class name derived from the provided interfaceClass. The package part of the interface name is stripped out, and the result passed to `generateClassName(String)`.

### toJavaClassName

    public static java.lang.String toJavaClassName(java.lang.Class inputClass)

  Deprecated.
  Javassist needs the class name to be as it appears in source code, even for arrays. Invoking getName() on a Class instance representing an array returns the internal format (i.e, "[...;" or something). This returns it as it would appear in Java code.

### isToString

    public static boolean isToString(java.lang.reflect.Method method)

  Deprecated.
  Returns true if the method is the standard toString() method. Very few interfaces will ever include this method as part of the interface, but we have to be sure.

### getPrimitiveType

    public static java.lang.Class getPrimitiveType(java.lang.String primitiveTypeName)

  Deprecated.

### toJVMBinaryName

    public static java.lang.String toJVMBinaryName(java.lang.String type)

  Deprecated.
  Translates types from standard Java format to Java VM format. For example, java.util.Locale remains java.util.Locale, but int[][] is translated to [[I and java.lang.Object[] to [Ljava.lang.Object;

### getPrimitiveType

    public static java.lang.Class getPrimitiveType(java.lang.Class wrapperType)

  Deprecated.
  Given a wrapper type, determines the corresponding primitive type.

### getWrapperType

    public static java.lang.Class getWrapperType(java.lang.Class type)

  Deprecated.
  Returns the wrapper type for an input type; for most types, this is the type. For primitive types, it is the corresponding wrapper type.

  Parameters:
    `type` - type to check
  Returns:
    type or corresponding wrapper type

### castReference

    public static java.lang.String castReference(java.lang.String reference,
                                                 java.lang.String desiredType)

  Deprecated.
  Takes a reference and casts it to the desired type. If the desired type is a primitive type, then the reference is cast to the correct wrapper type and a call to the correct unwrapper method is added. The end result is code that can be assigned to a field or parameter of the desired type (even if desired type is a primitive).

  Parameters:
    `reference` - to be cast
    `desiredType` - desired object or primitive type
  Returns:
    Javassist code to peform the cast

### getUnwrapMethodName

    public static java.lang.String getUnwrapMethodName(java.lang.Class primitiveType)

  Deprecated.
  Given a primitive type, finds the unwrap method of the corresponding wrapper type.

  Parameters:
    `primitiveType` -
  Returns:
    method name

### isPrimitiveType

    public static boolean isPrimitiveType(java.lang.String typeName)

  Deprecated.
  Given a type name, determines if that is the name of a primitive type.

### getTypeCode

    public static java.lang.String getTypeCode(java.lang.Class type)

  Deprecated.
  Converts a Class to a JVM type code (the way class information is expressed in a class file).

### getPathForClass

    public static java.lang.String getPathForClass(java.lang.Class clazz)

  Deprecated.
  Given a Class instance, convert the name into a path that can be used to locate the underlying class file on the classpath.

  Since:
    5.2.0

### getPathForClassNamed

    public static java.lang.String getPathForClassNamed(java.lang.String className)

  Deprecated.
  Given a fully qualified class name, converts to a path on the classpath.

  Since:
    5.2.0

### toFileFromFileProtocolURL

    public static java.io.File toFileFromFileProtocolURL(java.net.URL url)

  Deprecated.
  Converts a URL with protocol "file" to a File instance.

  Since:
    5.2.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.