Class ClassInfo
java.lang.Object
org.eclipse.birt.report.model.api.metadata.ClassInfo
- All Implemented Interfaces:
IClassInfo
,ILocalizableInfo
Represents the script object definition. This definition defines one
constructor, several members and methods. It also includes the name, display
name ID, and tool tip ID.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMember
(IMemberInfo memberDefn) Adds one member definition to this class definition.protected void
addMethod
(IMethodInfo methodInfo) Adds one method definition to this class definition.Returns the constructor definition.Returns the display name if the resource key of display name is available.Returns the resource key for display name.Returns the member definition given method name.Returns the list of member definitions.Get the method definition given the method name.Returns the method definition list.getName()
Returns the definition name.Returns the tool tip if the resource key of tool tip is available.Returns the resource key for tool tip.boolean
isNative()
Returns whether a class object is native.protected void
setConstructor
(IMethodInfo constructor) Adds constructor since some class has more than one constructor with different arguments.protected void
setDisplayNameKey
(String displayNameKey) Sets the resource key for display name.protected void
Sets the definition name.protected void
setNative
(boolean isNative) Sets the native attribute of this class.protected void
setToolTip
(String toolTip) Sets the display string for the tool tip of this method.protected void
setToolTipKey
(String toolTipKey) Sets the resource key for tool tip.
-
Constructor Details
-
ClassInfo
public ClassInfo()
-
-
Method Details
-
addMethod
Adds one method definition to this class definition.- Parameters:
methodInfo
- the definition of the method to add- Throws:
org.eclipse.birt.report.model.metadata.MetaDataException
- if the duplicate method name exists.
-
addMember
Adds one member definition to this class definition.- Parameters:
memberDefn
- the definition of the member to add- Throws:
org.eclipse.birt.report.model.metadata.MetaDataException
- if the duplicate member name exists.
-
getMethods
Returns the method definition list. For methods that have the same name, only return one method.- Specified by:
getMethods
in interfaceIClassInfo
- Returns:
- a list of method definitions
-
getMethod
Get the method definition given the method name.- Specified by:
getMethod
in interfaceIClassInfo
- Parameters:
name
- the name of the method to get- Returns:
- the definition of the method to get
-
getMembers
Returns the list of member definitions.- Specified by:
getMembers
in interfaceIClassInfo
- Returns:
- the list of member definitions
-
getMember
Returns the member definition given method name.- Specified by:
getMember
in interfaceIClassInfo
- Parameters:
name
- name of the member to get- Returns:
- the member definition to get
-
getConstructor
Returns the constructor definition.- Specified by:
getConstructor
in interfaceIClassInfo
- Returns:
- the constructor definition
-
setConstructor
Adds constructor since some class has more than one constructor with different arguments.- Parameters:
constructor
- the constructor definition to add- Throws:
org.eclipse.birt.report.model.metadata.MetaDataException
- if the constructor's name is empty.
-
isNative
public boolean isNative()Returns whether a class object is native.- Specified by:
isNative
in interfaceIClassInfo
- Returns:
true
if an object of this class is native, otherwisefalse
-
setNative
protected void setNative(boolean isNative) Sets the native attribute of this class.- Parameters:
isNative
-Boolean.TRUE
if an object of this class is native, otherwiseBoolean.FALSE
-
getDisplayNameKey
Description copied from interface:ILocalizableInfo
Returns the resource key for display name.- Specified by:
getDisplayNameKey
in interfaceILocalizableInfo
- Returns:
- the resource key for display name
-
getName
Description copied from interface:ILocalizableInfo
Returns the definition name.- Specified by:
getName
in interfaceILocalizableInfo
- Returns:
- the name of this definition
-
getToolTipKey
Description copied from interface:ILocalizableInfo
Returns the resource key for tool tip.- Specified by:
getToolTipKey
in interfaceILocalizableInfo
- Returns:
- the resource key for tool tip
-
setDisplayNameKey
Sets the resource key for display name.- Parameters:
displayNameKey
- the resource key to set
-
setName
Sets the definition name.- Parameters:
name
- the name to set
-
setToolTipKey
Sets the resource key for tool tip.- Parameters:
toolTipKey
- the resource key to set
-
getDisplayName
Description copied from interface:ILocalizableInfo
Returns the display name if the resource key of display name is available. Otherwise, return empty string.- Specified by:
getDisplayName
in interfaceILocalizableInfo
- Returns:
- the display name
-
getToolTip
Description copied from interface:ILocalizableInfo
Returns the tool tip if the resource key of tool tip is available. Otherwise, return empty string.- Specified by:
getToolTip
in interfaceILocalizableInfo
- Returns:
- the tool tip
-
setToolTip
Sets the display string for the tool tip of this method.- Parameters:
toolTip
- the user-visible, localized display name for the tool tip of this method.
-