public interface JCoClassMetaData extends JCoMetaData
Note: The implementation for this interface provided by the JCo runtime. Other implementations are not supported.
Modifier and Type | Interface and Description |
---|---|
static class |
JCoClassMetaData.JCoAttributeKind
An enumeration of the possible or relevant attribute types.
|
TYPE_ABAPOBJECT, TYPE_BCD, TYPE_BOX, TYPE_BYTE, TYPE_CDAY, TYPE_CHAR, TYPE_DATE, TYPE_DECF16, TYPE_DECF34, TYPE_DTDAY, TYPE_DTMONTH, TYPE_DTWEEK, TYPE_EXCEPTION, TYPE_FLOAT, TYPE_GENERIC_BOX, TYPE_INT, TYPE_INT1, TYPE_INT2, TYPE_INT8, TYPE_INVALID, TYPE_ITAB, TYPE_NUM, TYPE_STRING, TYPE_STRUCTURE, TYPE_TABLE, TYPE_TIME, TYPE_TMINUTE, TYPE_TSECOND, TYPE_UTCLONG, TYPE_UTCMINUTE, TYPE_UTCSECOND, TYPE_XSTRING, UNINITIALIZED
Modifier and Type | Method and Description |
---|---|
void |
add(String declaringClass,
String attributeName,
int attributeType,
int charLength,
int decimals,
String description,
Object metaData,
JCoExtendedFieldMetaData extended,
JCoClassMetaData.JCoAttributeKind kind,
boolean readOnly,
String initialValue)
Adds an attribute to the class definition.
|
void |
addImplementedInterface(String implementedInterface)
Adds an interface implemented by the class type.
|
void |
addParentClass(String parentClass)
Adds the parent class.
|
JCoClassMetaData.JCoAttributeKind |
getAttributeKind(int index)
Returns what kind of attribute the given attribute is.
|
JCoClassMetaData.JCoAttributeKind |
getAttributeKind(String attributeName)
Returns what kind of attribute the given attribute is.
|
String |
getDeclaringClass(int index)
Returns the name of the declaring class of the given attribute.
|
String |
getDeclaringClass(String attributeName)
Returns the name of the declaring class of the given attribute.
|
String |
getDefault(int index)
Returns the default value of the data field at the specified index.
|
String |
getDefault(String attributeName)
Returns the default value for the attribute with the given name.
|
List<String> |
getImplementedInterfaces()
Returns the list of implemented interfaces.
|
List<String> |
getParentClasses()
Returns the parent classes.
|
boolean |
isReadOnly(int index)
Indicates whether the given attribute is a read-only attribute or not.
|
boolean |
isReadOnly(String attributeName)
Indicates whether the given attribute is a read-only attribute or not.
|
getByteLength, getByteLength, getClassMetaData, getClassMetaData, getClassNameOfField, getClassNameOfField, getDecimals, getDecimals, getDescription, getDescription, getExtendedFieldMetaData, getExtendedFieldMetaData, getFieldCount, getLength, getLength, getName, getName, getRecordMetaData, getRecordMetaData, getRecordTypeName, getRecordTypeName, getType, getType, getTypeAsString, getTypeAsString, getUnicodeByteLength, getUnicodeByteLength, hasField, indexOf, isAbapObject, isAbapObject, isLocked, isNestedType1Structure, isNestedType1Structure, isStructure, isStructure, isTable, isTable, lock, setName
List<String> getParentClasses()
String
array starting with the root class and then going down the extension
hierarchy until the current class is reached.List<String> getImplementedInterfaces()
boolean isReadOnly(String attributeName)
attributeName
- -
the name of the attributetrue
if the attribute is read-only (const
) or notJCoRuntimeException
- with group JCoException.JCO_ERROR_FIELD_NOT_FOUND
if an attribute with
the given name does not existisReadOnly(int)
boolean isReadOnly(int index)
index
- -
the index of the attributetrue
if the attribute is read-only (const
) or notisReadOnly(String)
JCoClassMetaData.JCoAttributeKind getAttributeKind(String attributeName)
attributeName
- -
the name of the attributeJCoClassMetaData.JCoAttributeKind
JCoRuntimeException
- with group JCoException.JCO_ERROR_FIELD_NOT_FOUND
if an attribute with
the given name does not existgetAttributeKind(int)
JCoClassMetaData.JCoAttributeKind getAttributeKind(int index)
index
- -
the index of the attributeJCoClassMetaData.JCoAttributeKind
getAttributeKind(String)
String getDeclaringClass(String attributeName)
attributeName
- -
the name of the attributegetDeclaringClass(String)
String getDeclaringClass(int index)
index
- - the index of the attributeJCoRuntimeException
- with group JCoException.JCO_ERROR_FIELD_NOT_FOUND
if an attribute with
the given name does not existgetDeclaringClass(int)
String getDefault(int index)
index
- -
the index of the fieldgetDefault(String)
String getDefault(String attributeName)
attributeName
- -
the name of the attributeJCoRuntimeException
- with group JCoException.JCO_ERROR_FIELD_NOT_FOUND
if an attribute with
the given name does not existgetDefault(int)
void add(String declaringClass, String attributeName, int attributeType, int charLength, int decimals, String description, Object metaData, JCoExtendedFieldMetaData extended, JCoClassMetaData.JCoAttributeKind kind, boolean readOnly, String initialValue)
declaringClass
- class where the attribute was declaredattributeName
- attribute nameattributeType
- type of the attributecharLength
- length in charsdecimals
- number of decimals in case of BCD typedescription
- attribute descriptionmetaData
- metadata if the attribute has a non scalar typeextended
- additional object associated with the attributekind
- kind of attribute - instance, class member or constantreadOnly
- flag, true if the attribute has read only accessinitialValue
- initial value for the attributevoid addParentClass(String parentClass)
parentClass
- a parent classvoid addImplementedInterface(String implementedInterface)
implementedInterface
- implemented interfaceCopyright © 2018 SAP. All Rights Reserved.