@Override
        @SuppressWarnings("unchecked")
        public Schema<T> getSchema()
        {
            Schema<T> schema = this.schema;
            if (schema == null)
            {
                synchronized (this)
                {
                    if ((schema = this.schema) == null)
                    {
                        if (Message.class.isAssignableFrom(typeClass))
                        {
                            // use the message's schema.
                            Message<T> m = (Message<T>) createMessageInstance(typeClass);
                            this.schema = schema = m.cachedSchema();
                        }
                        else
                        {
                            // create new
                            this.schema = schema = strategy
                                    .newSchema(typeClass);
                        }
                    }
                }
            }

            return schema;
        }
Used by {@link RuntimeSchema#map(Class, Class)}.
protostuff-runtime/src/main/java/io/protostuff/runtime/DefaultIdStrategy.java