|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjavax.script.SimpleScriptContext
public class SimpleScriptContext
ScriptContext 의 단순한 구현입니다.
| 필드의 개요 | |
|---|---|
protected Bindings |
engineScope
이것은, 엔진 스코프 바인딩입니다. |
protected Writer |
errorWriter
이것은, 스크립트로부터의 출력 에러에 사용되는 라이터입니다. |
protected Bindings |
globalScope
이것은, 글로벌 스코프의 바인딩입니다. |
protected Reader |
reader
이것은, 스크립트로부터의 입력에 사용되는 리더입니다. |
protected Writer |
writer
이것은, 스크립트로부터의 출력에 사용되는 라이터입니다. |
| 인터페이스 javax.script. ScriptContext 로부터 상속된 필드 |
|---|
ENGINE_SCOPE , GLOBAL_SCOPE |
| 생성자 의 개요 | |
|---|---|
SimpleScriptContext ()
|
|
| 메소드의 개요 | |
|---|---|
Object |
getAttribute (String name)
스코프내에서, 지정된 이름을 가지는 속성의 값을 검색해, 최초로 발견된 것을 가져옵니다. |
Object |
getAttribute (String name,
int scope)
지정된 스코프내의 속성의 값을 가져옵니다. |
int |
getAttributesScope (String name)
속성이 정의되고 있는 최소의 스코프를 가져옵니다. |
Bindings |
getBindings (int scope)
지정된 스코프가 ENGINE_SCOPE 의 경우,engineScope 필드의 값을 돌려줍니다. |
Writer |
getErrorWriter ()
에러 출력을 표시할 경우에 사용하는 Writer 를 돌려줍니다. |
Reader |
getReader ()
입력을 읽어들이기 위해서(때문에) 스크립트가 사용하는 Reader 를 돌려줍니다. |
List <Integer > |
getScopes ()
ScriptContext 내의 스코프에 대한, 모든 유효치의 불변의 List 를 돌려줍니다. |
Writer |
getWriter ()
출력을 표시할 경우에 사용하는 스크립트의 Writer 를 돌려줍니다. |
Object |
removeAttribute (String name,
int scope)
지정된 스코프내의 속성을 삭제합니다. |
void |
setAttribute (String name,
Object value,
int scope)
지정된 스코프내의 속성의 값을 설정합니다. |
void |
setBindings (Bindings bindings,
int scope)
지정된 스코프의 속성의 Bindings 를 설정합니다. |
void |
setErrorWriter (Writer writer)
에러 출력을 표시할 경우에 사용하는 Writer 를 설정합니다. |
void |
setReader (Reader reader)
입력을 읽어들이기 위한 스크립트의 Reader 를 설정합니다. |
void |
setWriter (Writer writer)
출력을 표시할 경우에 사용하는 스크립트의 Writer 를 설정합니다. |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| 필드의 상세 |
|---|
protected Writer writer
System.out 에 근거한 PrintWriter 가 사용됩니다. 이 필드의 관리에는, 액세스용 메소드 getWriter 및 setWriter 가 사용됩니다.
System.out ,
PrintWriter protected Writer errorWriter
System.err 에 근거한 PrintWriter 가 사용됩니다. 이 필드의 관리에는, 액세스용 메소드 getErrorWriter 및 setErrorWriter 가 사용됩니다.
System.err ,
PrintWriter protected Reader reader
System.in 에 근거한 InputStreamReader 가 사용됩니다. 이 리더는, 디폴트의 캐릭터 세트를 사용합니다. 이 필드의 관리에는, 액세스용 메소드 getReader 및 setReader 가 사용됩니다.
System.in ,
InputStreamReader protected Bindings engineScope
SimpleBindings 가 사용됩니다. 이 필드의 관리에는, 액세스용 메소드 setBindings 및 getBindings 가 사용됩니다.
SimpleBindings protected Bindings globalScope
| 생성자 의 상세 |
|---|
public SimpleScriptContext()
| 메소드의 상세 |
|---|
public void setBindings(Bindings bindings,
int scope)
Bindings 를 설정합니다. 스코프의 값이 ENGINE_SCOPE 인 경우, 지정된 Bindings 가 engineScope 필드를 치환합니다. 스코프의 값이 GLOBAL_SCOPE 인 경우, 지정된 Bindings 가 globalScope 필드를 치환합니다.
ScriptContext 내의 setBindings bindings - 설정하는 속성의 Bindings. scope - 속성이 설정되는 스코프의 값.
IllegalArgumentException - 스코프가 무효인 경우.
NullPointerException - 스코프의 값이 ENGINE_SCOPE 로, 지정된 Bindings 가 null 의 경우. public Object getAttribute(String name)
ScriptContext 내의 getAttribute name - 취득하는 속성의 이름.
NullPointerException - 이름이 null 의 경우.
IllegalArgumentException - 이름이 빈 상태(empty)의 경우.
public Object getAttribute(String name,
int scope)
ScriptContext 내의 getAttribute name - 취득하는 속성의 이름. scope - 속성을 취득하는 스코프.
null.
IllegalArgumentException - name 가 빈 상태(empty)의 경우, 또는 스코프의 값이 무효의 경우.
NullPointerException - 이름이 null 의 경우.
public Object removeAttribute(String name,
int scope)
ScriptContext 내의 removeAttribute name - 삭제하는 속성의 이름scope - 속성을 삭제하는 스코프
IllegalArgumentException - name 가 빈 상태(empty)의 경우, 또는 스코프가 무효의 경우.
NullPointerException - 이름이 null 의 경우.
public void setAttribute(String name,
Object value,
int scope)
ScriptContext 내의 setAttribute name - 설정하는 속성의 이름value - 속성의 값scope - 속성을 설정하는 스코프
IllegalArgumentException - name 가 빈 상태(empty)의 경우, 또는 스코프가 무효의 경우.
NullPointerException - 이름이 null 의 경우. public Writer getWriter()
Writer 를 돌려줍니다.
ScriptContext 내의 getWriter Writerpublic Reader getReader()
Reader 를 돌려줍니다.
ScriptContext 내의 getReader Readerpublic void setReader(Reader reader)
Reader 를 설정합니다.
ScriptContext 내의 setReader reader - 새로운 Readerpublic void setWriter(Writer writer)
Writer 를 설정합니다.
ScriptContext 내의 setWriter writer - 새로운 Writerpublic Writer getErrorWriter()
Writer 를 돌려줍니다.
ScriptContext 내의 getErrorWriter Writerpublic void setErrorWriter(Writer writer)
Writer 를 설정합니다.
ScriptContext 내의 setErrorWriter writer - Writerpublic int getAttributesScope(String name)
ScriptContext 내의 getAttributesScope name - 속성의 이름
.
NullPointerException - name 가 null 의 경우.
IllegalArgumentException - name 가 빈 상태(empty)의 경우. public Bindings getBindings(int scope)
ENGINE_SCOPE 의 경우,engineScope 필드의 값을 돌려줍니다. 지정된 스코프가 GLOBAL_SCOPE 의 경우,globalScope 필드의 값을 돌려줍니다.
ScriptContext 내의 getBindings scope - 지정된 스코프
engineScope 또는 globalScope 필드의 값.
IllegalArgumentException - 스코프의 값이 무효인 경우. public List <Integer > getScopes()
List 를 돌려줍니다.
ScriptContext 내의 getScopes
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.