Modifier and Type | Field and Description |
---|---|
static String |
SLOT_VALUE |
static String |
TRAIT_CLASS |
static String |
TRAIT_DISP |
static String |
TRAIT_FINAL |
static String |
TRAIT_METHOD |
static String |
TRAIT_NAME |
static String |
TRAIT_OVERRIDE |
static String |
TRAIT_PUBLIC |
static String |
TRAIT_SLOT |
static String |
TRAIT_TYPE |
Constructor and Description |
---|
Trait(int kind,
Name name)
Construct a Trait.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttr(String key,
Object value)
Add a trait attribute.
|
void |
addMetadata(Metadata md)
Add a metadata entry to this trait.
|
Object |
getAttr(String attr_name)
Get an attribute's value.
|
boolean |
getBooleanAttr(String attr_name)
Get a boolean attribute's value.
|
byte |
getFullKindByte() |
int |
getIntAttr(String attr_name)
Get a integer attribute's value.
|
byte |
getKind() |
Vector<Metadata> |
getMetadata() |
Name |
getName() |
Name |
getNameAttr(String attr_name)
Get a Name attribute's value.
|
boolean |
hasAttr(String attr_name)
Determine whether an attribute is present.
|
boolean |
hasMetadata() |
boolean |
isClass() |
boolean |
isConst() |
boolean |
isFinal() |
boolean |
isGetter() |
boolean |
isMethod() |
boolean |
isOverride() |
boolean |
isSetter() |
boolean |
isSlot() |
void |
setAttr(String attr_name,
Object attr_value)
Set a trait attribute.
|
void |
setKind(int kind_byte) |
public static final String TRAIT_CLASS
public static final String TRAIT_DISP
public static final String TRAIT_FINAL
public static final String TRAIT_METHOD
public static final String TRAIT_NAME
public static final String TRAIT_OVERRIDE
public static final String TRAIT_PUBLIC
public static final String TRAIT_SLOT
public static final String TRAIT_TYPE
public static final String SLOT_VALUE
public Trait(int kind, Name name)
kind
- - the Trait's kind nibble.public void addAttr(String key, Object value)
key
- - the attribute's name.value
- - the attribute's value.
the attribute must not be present.
public byte getKind()
public byte getFullKindByte()
public Name getName()
public void setAttr(String attr_name, Object attr_value)
attr_name
- - the attribute's name.attr_value
- - the attribute's value.public boolean hasAttr(String attr_name)
attr_name
- - the attribute's name.public Object getAttr(String attr_name)
attr_name
- - the attribute's name.public int getIntAttr(String attr_name)
attr_name
- - the attribute's name.public Name getNameAttr(String attr_name)
attr_name
- - the attribute's name.public boolean getBooleanAttr(String attr_name)
attr_name
- - the attribute's name.public void setKind(int kind_byte)
kind_byte
- the kind_byte to setpublic boolean isFinal()
public boolean isOverride()
public boolean hasMetadata()
public boolean isConst()
public boolean isClass()
public boolean isMethod()
public boolean isGetter()
public boolean isSetter()
public boolean isSlot()
public void addMetadata(Metadata md)
md
- - the metadata to add.Copyright © 2016 The Apache Software Foundation. All rights reserved.