xbn.jdlcode
Class JDClass

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.jdlcode.JDFile
              |
              +--xbn.jdlcode.JDClass
All Implemented Interfaces:
Named

public class JDClass
extends JDFile
implements Named

A JDFile that is explicitely defined it the jdlcode doclet class map configuration file. See getJDCAFromFLR.

Manage a set of JDClasses with JDCArray

Source code:  JDClass.java.


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
JDClass(String s_abbreviation, String s_fullyQualifiedClassName, PTArray pt_array)
          Create a JDClass.
 
Method Summary
 String getAbbreviation()
          Get the abbreviation assigned to this JDClass.
 String getExternalUrl()
          Get the external url for this JDClass.
 String getName()
          Get theh name of this JDClass.
 PackageType getPackageType()
          Get the PackageType of this JDClass.
 String getPackageTypePrefix()
          Get the PackageType prefix of this JDClass.
 boolean isExternal()
          Is this JDClass external?
 boolean isLocal()
          Is this JDClass local?
 boolean isNameAbbrevOrFQCN()
          What is the name of this JDClass?.
 boolean isPrimitive()
          Is this JDClass primitive?
 void setNameAbbrevOrFQCN(boolean b_abbrevOrFQCN)
          Determine what the name of this JDClass should be.
 String toString()
          Get some information about this JDClass.
 
Methods inherited from class xbn.jdlcode.JDFile
equals, getAPSLinkPagesINDIRECT, getAPSLinkPagesNONE, getDirCount, getFileName, getList, getPackageList, getPackagePrefix, getPart, getPartCount, getPASSPackage, getPASString, hasJDLCsDirectly, hasJDLCsIndirectly, hasNoJDLCodes, isInSamePackageAs
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDClass

public JDClass(String s_abbreviation,
               String s_fullyQualifiedClassName,
               PTArray pt_array)

Create a JDClass.

Parameters:
s_abbreviation - The abbreviation assigned to this class. For example, you might assign "s" to java.lang.String. Must contain only letters, digits and underscores. See getAbbreviation.
s_fullyQualifiedClassName - Must conform to the following restrictions:
  • Must be valid according to the super constructor
  • Every part must contain only letters, digits and underscores.
  • The last part may have the special value of "package-summary" or "overview-summary".
  • getPart(0) must be valid according to pt_array.doesExist.
  • If getPart(0) does not exist in pt_array, and getPartCount equals one and getPart(0) is only lowercase letters, then this JDClass is primitive.
pt_array - The PTArray defining all PackageTypes.
Method Detail

getAbbreviation

public String getAbbreviation()

Get the abbreviation assigned to this JDClass.

Returns:
s_abbreviation, exactly as provided to the constructor.

setNameAbbrevOrFQCN

public void setNameAbbrevOrFQCN(boolean b_abbrevOrFQCN)

Determine what the name of this JDClass should be.

Get with isNameAbbrevOrFQCN

Parameters:
b_abbrevOrFQCN - If true, then name should be the abbreviation. If false, the name should be the fully qualified class name.

isNameAbbrevOrFQCN

public boolean isNameAbbrevOrFQCN()

What is the name of this JDClass?. The abbreviation or the fully qualified class name?

Set with setNameAbbrevOrFQCN

Returns:
true If the name is the abbreviation.
false If the name is the fully qualified class name.

getName

public String getName()

Get theh name of this JDClass.

Specified by:
getName in interface Named
Returns:
getAbbreviation() if isNameAbbrevOrFQCN is true.
getList(".") if isNameAbbrevOrFQCN is false.

getPackageType

public PackageType getPackageType()

Get the PackageType of this JDClass.

Returns:
null If this JDClass is primitive.
a PackageType object If this JDClass is local or external.

getPackageTypePrefix

public String getPackageTypePrefix()

Get the PackageType prefix of this JDClass.

Returns:
"primitive" If this JDClass is primitive.
getPackageType().getPrefix() If this JDClass is local or external.

isPrimitive

public boolean isPrimitive()

Is this JDClass primitive?

Overrides:
isPrimitive in class JDFile
Returns:
(getPackageType() == null)

isLocal

public boolean isLocal()

Is this JDClass local?

Overrides:
isLocal in class JDFile
Returns:
true If both isPrimitive and getPackageType().isExternal() equal false.

isExternal

public boolean isExternal()

Is this JDClass external?

Overrides:
isExternal in class JDFile
Returns:
true If isPrimitive equals false and getPackageType().isExternal() equals true.

getExternalUrl

public String getExternalUrl()

Get the external url for this JDClass.

Returns:
getPackageType().getExternalUrl()
Throws:
AssertException - if isExternal equals false.

toString

public String toString()

Get some information about this JDClass.

Overrides:
toString in class JDFile



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo