Example usage for javax.management.openmbean OpenType OpenType

List of usage examples for javax.management.openmbean OpenType OpenType

Introduction

In this page you can find the example usage for javax.management.openmbean OpenType OpenType.

Prototype

protected OpenType(String className, String typeName, String description) throws OpenDataException 

Source Link

Document

Constructs an OpenType instance (actually a subclass instance as OpenType is abstract), checking for the validity of the given parameters.

Usage

From source file:org.jolokia.converter.object.StringToOpenTypeConverterTest.java

@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ".*No converter.*")
public void unknownOpenType() throws OpenDataException {
    converter.convertToObject(new OpenType("java.util.Date", "guenther", "guenther") {
        @Override/*from ww w  . ja  v a 2s  .c o m*/
        public boolean isValue(Object obj) {
            return false;
        }

        @Override
        public boolean equals(Object obj) {
            return false;
        }

        @Override
        public int hashCode() {
            return 0;
        }

        @Override
        public String toString() {
            return null;
        }
    }, "bla");
}