Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl
Class JavaName

java.lang.Object
  extended by org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.Name
      extended by org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.LangName
          extended by org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.JavaName


public class JavaName
extends LangName

A JavaName encapsulates the Java name of a class. A JavaName identifies the package name, the class name within the package, and the "generated" name of the class.


Field Summary
protected  java.lang.String m_declItf
           
protected  java.lang.String m_declItfPackage
           
(package private) static java.lang.String m_defaultPackage
           
protected  java.lang.String m_useItf
           
protected  java.lang.String m_useItfPackage
           
protected  java.lang.String m_usePackage
           

 

Fields inherited from class org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.LangName
m_useClass

 

Fields inherited from class org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.Name
m_annotation, m_context, m_name, NO_CONTEXT

 

Constructor Summary
JavaName(java.lang.String packageName, java.lang.String typeName)
          Create a new JavaName.
JavaName(java.lang.String packageName, java.lang.String useName, java.lang.String useItf, java.lang.String declName, java.lang.String declItf)
          Initializes a JavaName with a package name, use name, and decl name.

 

Method Summary
 java.lang.String getDeclClass(java.lang.String currPackage)
           
 java.lang.String getDeclItf()
          Returns the name of the decl interface
 java.lang.String getDeclItf(java.lang.String currPackage)
          Returns the name of the decl interface
 java.lang.String getDeclItfPackage()
          Returns the package name of the decl interface
static java.lang.String getDefaultPackage()
           
 java.lang.String getUseClass()
           
 java.lang.String getUseClass(boolean full)
           
 java.lang.String getUseClass(java.lang.String currPackage)
          Returns the name to be used to refer to this class.
 java.lang.String getUseItf()
          Returns the name of the use interface
 java.lang.String getUseItf(java.lang.String currPackage)
          Returns the name of the use interface
 java.lang.String getUseItfPackage()
          Returns the package name of the use interface
 java.lang.String getUsePackage()
          Returns the package name of the use class
 boolean hasUseClass()
          if the represented type has the user subclass
private  void processUnicode()
           
static void setDefaultPackage(java.lang.String defaultPackage)
          Initialize the JavaName class with the default package name, used when a JavaName is created without an explciit package name
 java.lang.String toString()
          Returns the complete name of the declared entity.
 void ungenPattern(java.lang.String simpleName)
           

 

Methods inherited from class org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.LangName
getDeclClass, getDeclPackage, packageConcat, unicode2Ascii

 

Methods inherited from class org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.Name
equals, getAnnotation, getContextName, getSimpleName, hasDeclItf, hashCode, hasUseItf, renameJavaMethodPrefix, setAnnotation

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

m_defaultPackage

static java.lang.String m_defaultPackage

m_useItfPackage

protected java.lang.String m_useItfPackage

m_useItf

protected java.lang.String m_useItf

m_declItfPackage

protected java.lang.String m_declItfPackage

m_declItf

protected java.lang.String m_declItf

m_usePackage

protected java.lang.String m_usePackage

Constructor Detail

JavaName

public JavaName(java.lang.String packageName,
                java.lang.String useName,
                java.lang.String useItf,
                java.lang.String declName,
                java.lang.String declItf)
Initializes a JavaName with a package name, use name, and decl name. If the supplied package is null, the default package will be used. If the supplied decl name is null (the usual case), the decl name will be the same as the use name. The decl name is the name of the class that JPub generates. It is different from the use name, the name of the class that represents the SQL type, if the class is user-written. The user tells JPub that this is the case by putting the clause "GENERATE <decl class name> AS <use class name> in the input file. * @param package the package in which the class is declared
Parameters:
useName - the use name (class name for use as opposed to declaration)
declName - the decl name (class name for declaration as opposed to use)

JavaName

public JavaName(java.lang.String packageName,
                java.lang.String typeName)
Create a new JavaName. Do not modify the packageName, even if it is "". Both the useName and declName are set equal to the typeName. This constructor is used for predefined Java types.

Method Detail

processUnicode

private void processUnicode()

toString

public java.lang.String toString()
Description copied from class: Name
Returns the complete name of the declared entity. The returned name includes the context name and the name of the entity within the context.
Specified by:
toString in class Name

getDeclItfPackage

public java.lang.String getDeclItfPackage()
Returns the package name of the decl interface
Overrides:
getDeclItfPackage in class Name

getDeclItf

public java.lang.String getDeclItf()
Returns the name of the decl interface
Overrides:
getDeclItf in class Name

getDeclItf

public java.lang.String getDeclItf(java.lang.String currPackage)
Returns the name of the decl interface

getDeclClass

public java.lang.String getDeclClass(java.lang.String currPackage)

getUseClass

public java.lang.String getUseClass()
Overrides:
getUseClass in class Name

getUseClass

public java.lang.String getUseClass(boolean full)
Overrides:
getUseClass in class Name

getUsePackage

public java.lang.String getUsePackage()
Returns the package name of the use class
Overrides:
getUsePackage in class Name

getUseItfPackage

public java.lang.String getUseItfPackage()
Returns the package name of the use interface
Overrides:
getUseItfPackage in class Name

hasUseClass

public boolean hasUseClass()
if the represented type has the user subclass
Specified by:
hasUseClass in class Name

getUseClass

public java.lang.String getUseClass(java.lang.String currPackage)
Returns the name to be used to refer to this class. If the package in which this class is mentioned is the use package of this class, return the unqualified use class name. Otherwise, return use package name + "." + use class name. * @param currPackage the package in which the reference occurs
Overrides:
getUseClass in class Name

ungenPattern

public void ungenPattern(java.lang.String simpleName)

getUseItf

public java.lang.String getUseItf()
Returns the name of the use interface
Overrides:
getUseItf in class Name

getUseItf

public java.lang.String getUseItf(java.lang.String currPackage)
Returns the name of the use interface

setDefaultPackage

public static void setDefaultPackage(java.lang.String defaultPackage)
Initialize the JavaName class with the default package name, used when a JavaName is created without an explciit package name. * @param defaultPackage the name of the default package

getDefaultPackage

public static java.lang.String getDefaultPackage()

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.