@ Nullable public SoyType getType ( String typeName ) { SoyType result = BUILTIN_TYPES . get ( typeName ) ; if ( result != null ) { return result ; } synchronized ( lock ) { result = protoTypeCache . get ( typeName ) ; if ( result == null ) { GenericDescriptor descriptor = descriptors . get ( typeName ) ; if ( descriptor == null ) { return null ; } if ( descriptor instanceof EnumDescriptor ) { result = new SoyProtoEnumType ( ( EnumDescriptor ) descriptor ) ; } else { result = new SoyProtoType ( this , ( Descriptor ) descriptor , extensions . get ( typeName ) ) ; } protoTypeCache . put ( typeName , result ) ; } } return result ; }
Look up a type by name . Returns null if there is no such type .