trait AsJavaObject extends AnyRef
Mixed in by domains that support the conversation of a DomainValue
into
a respective Java object. This Java object can then be used to perform method
invocations.
Limitation
Using AsJavaObject
will only work reasonably iff the respective class
is either in the classpath of the JVM or a class loader (initialized with the
project's classpath) is used.
The latter, however, does not work for classes on the bootclasspath (e.g.,
java.lang.String
). In that case it is necessary to check that the code of the
analyzed application is compatible with the one on the class path.
To avoid accidental imprecision in the analysis you should use this features
only for stable classes belonging to the core JDK (java.lang...
.)
- Self Type
- AsJavaObject with ReferenceValuesDomain
- Source
- AsJavaObject.scala
- Alphabetic
- By Inheritance
- AsJavaObject
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toJavaObject(pc: Int, value: (AsJavaObject.this)#DomainValue): Option[AnyRef]
Converts – if possible – a given
DomainValue
to a Java object that is appropriately initialized.Converts – if possible – a given
DomainValue
to a Java object that is appropriately initialized.Implementation
Every domain that supports the creation of a Java object's based on a domain value is expected to implement this method and to test if it can create a precise representation of the given value. If not, the implementation has to delegate the responsibility to the super method to creat an abstract representation.
abstract override def toJavaObject(value : DomainValue): Option[Object] = { if(value...) // create and return Java object else super.toJavaObject(value) }
- returns
Some(Object) is returned if it was possible to create a compatible corresponding Java object; otherwise
None
is returned. Default:None
unless thevalue
is null. In the latter caseSome(null)
is returned.
- Note
This operation is generally only possible if the domain value maintains enough state information to completely initialize the Java object.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated