SubjectBuilder.buildSubject

Creates and returns a new {@code Subject} instance reflecting the cumulative state acquired by the other methods in this class. <p/> This {@code Builder} instance will still retain the underlying state after this method is called - it will not clear it; repeated calls to this method will return multiple {@link Subject} instances, all reflecting the exact same state. If a new (different) {@code Subject} is to be constructed, a new {@code Builder} instance must be created. <p/> <b>Note</b> that the returned {@code Subject} instance is <b>not</b> automatically bound to the application (thread) for further use. That is, {@link hunt.shiro.SecurityUtils SecurityUtils}.{@link hunt.shiro.SecurityUtils#getSubject() getSubject()} will not automatically return the same instance as what is returned by the builder. It is up to the framework developer to bind the returned {@code Subject} for continued use if desired.

@return a new {@code Subject} instance reflecting the cumulative state acquired by the other methods in this class.

class SubjectBuilder
buildSubject
()

Meta