Class ResolvableType
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.writer.ResolvableType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypedValueImpl
asValue(boolean value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(byte value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(char value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(double value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(float value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(int value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(long value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(short value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(Object value)
TypedValueImpl
asValue(String value)
Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImpl
asValue(Consumer<TypedValueBuilder> builderCallback)
Shortcut for creating a new TypedValue object for this typeboolean
canAccept(Object value)
Checks whether the type can accept the given valueboolean
equals(Object o)
List<Annotation>
getAnnotations()
TypedFieldImpl
getField(String name)
List<TypedFieldImpl>
getFields()
long
getId()
String
getSupertype()
String
getTypeName()
TypesImpl
getTypes()
boolean
hasConstantPool()
int
hashCode()
boolean
isBuiltin()
boolean
isResolved()
boolean
isSame(NamedType other)
boolean
isSimple()
A simple type has only one field which is of a built-in typeboolean
isUsedBy(Type other)
Checks whether this particular type is used as a field type in the other type.TypedValueImpl
nullValue()
String
toString()
TypedValueBuilderImpl
valueBuilder()
-
-
-
Method Detail
-
isResolved
public boolean isResolved()
- Specified by:
isResolved
in interfaceType
- Returns:
- true if the type is fully resolved
-
hasConstantPool
public boolean hasConstantPool()
- Specified by:
hasConstantPool
in interfaceType
- Returns:
- is the type using constant pool
-
asValue
public TypedValueImpl asValue(String value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(byte value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(char value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(short value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(int value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(long value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(float value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(double value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(boolean value)
Description copied from interface:Type
Shortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
value
- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(Consumer<TypedValueBuilder> builderCallback)
Description copied from interface:Type
Shortcut for creating a new TypedValue object for this type- Specified by:
asValue
in interfaceType
- Specified by:
asValue
in interfaceTypeImpl
- Parameters:
builderCallback
- will be called when the new TypedValue is being initialized- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(Object value)
-
nullValue
public TypedValueImpl nullValue()
- Specified by:
nullValue
in interfaceType
- Specified by:
nullValue
in interfaceTypeImpl
- Returns:
- a specific TypedValue instance designated as the null value for this type
-
isBuiltin
public boolean isBuiltin()
-
isSimple
public boolean isSimple()
Description copied from interface:Type
A simple type has only one field which is of a built-in type
-
getSupertype
public String getSupertype()
- Specified by:
getSupertype
in interfaceType
- Returns:
- the super type - may be null
-
getFields
public List<TypedFieldImpl> getFields()
-
getField
public TypedFieldImpl getField(String name)
-
getAnnotations
public List<Annotation> getAnnotations()
- Specified by:
getAnnotations
in interfaceType
- Returns:
- attached annotations
-
canAccept
public boolean canAccept(Object value)
Description copied from interface:Type
Checks whether the type can accept the given value
-
getTypeName
public String getTypeName()
- Specified by:
getTypeName
in interfaceNamedType
- Returns:
- the type name
-
isSame
public boolean isSame(NamedType other)
-
isUsedBy
public boolean isUsedBy(Type other)
Description copied from interface:Type
Checks whether this particular type is used as a field type in the other type.
-
getTypes
public TypesImpl getTypes()
-
valueBuilder
public TypedValueBuilderImpl valueBuilder()
- Specified by:
valueBuilder
in interfaceType
- Specified by:
valueBuilder
in interfaceTypeImpl
- Returns:
- a new TypedValueBuilder instance for a value of this particular type
-
-