java.beans.Statement Java Examples
The following examples show how to use
java.beans.Statement.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClassForName.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static void simpleTest() throws Exception { // load the class without initialization new Statement(Class.class, "forName", new Object[]{ "ClassForName$Bean", false, Bean.class.getClassLoader() }).execute(); if (initialized) { throw new RuntimeException("Should not be initialized"); } // load the class and initialize it new Statement(Class.class, "forName", new Object[]{ "ClassForName$Bean", true, Bean.class.getClassLoader() }).execute(); if (!initialized) { throw new RuntimeException("Should be initialized"); } }
Example #2
Source File: Test8005065.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #3
Source File: Test8005065.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #4
Source File: Test8013416.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #5
Source File: Test8013416.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #6
Source File: MainPanel.java From java-swing-tips with MIT License | 5 votes |
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") @Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) { super.initialize(type, oldInstance, newInstance, encoder); DefaultTableModel m = (DefaultTableModel) oldInstance; // Vector v = m.getDataVector(); // for (int i = 0; i < m.getRowCount(); i++) { // encoder.writeStatement(new Statement(oldInstance, "addRow", new Object[] { (Vector) v.get(i) })); // } for (int row = 0; row < m.getRowCount(); row++) { for (int col = 0; col < m.getColumnCount(); col++) { Object[] o = {m.getValueAt(row, col), row, col}; encoder.writeStatement(new Statement(oldInstance, "setValueAt", o)); } } }
Example #7
Source File: Test8005065.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #8
Source File: Test8013416.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #9
Source File: Test8005065.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #10
Source File: Test8013416.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #11
Source File: Test8013416.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #12
Source File: Test8005065.java From hottub with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #13
Source File: Test8005065.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #14
Source File: Test8013416.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #15
Source File: Test8013416.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #16
Source File: Test8005065.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #17
Source File: Test8005065.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #18
Source File: Test8013416.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #19
Source File: Test8013416.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #20
Source File: Test8013416.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #21
Source File: Test8005065.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #22
Source File: Test8005065.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #23
Source File: ObjectUtils.java From gridgo with MIT License | 5 votes |
public static void setValue(Object config, String attr, Object value) { var setter = "set" + StringUtils.upperCaseFirstLetter(attr); var stmt = new Statement(config, setter, new Object[] { value }); try { stmt.execute(); } catch (Exception e) { throw new RuntimeException(e); } }
Example #24
Source File: Test8005065.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #25
Source File: MainPanel.java From java-swing-tips with MIT License | 5 votes |
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") @Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) { super.initialize(type, oldInstance, newInstance, encoder); DefaultTableModel m = (DefaultTableModel) oldInstance; for (int row = 0; row < m.getRowCount(); row++) { for (int col = 0; col < m.getColumnCount(); col++) { Object[] o = {m.getValueAt(row, col), row, col}; encoder.writeStatement(new Statement(oldInstance, "setValueAt", o)); } } }
Example #26
Source File: Test8005065.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #27
Source File: Test8013416.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }
Example #28
Source File: MainPanel.java From java-swing-tips with MIT License | 5 votes |
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") @Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) { super.initialize(type, oldInstance, newInstance, encoder); DefaultTableModel m = (DefaultTableModel) oldInstance; for (int row = 0; row < m.getRowCount(); row++) { for (int col = 0; col < m.getColumnCount(); col++) { Object[] o = {m.getValueAt(row, col), row, col}; encoder.writeStatement(new Statement(oldInstance, "setValueAt", o)); } } }
Example #29
Source File: Test8005065.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static void testStatement() { Object[] array = { new Object() }; Statement statement = new Statement(null, null, array); test(statement.getArguments()); array[0] = null; test(statement.getArguments()); statement.getArguments()[0] = null; test(statement.getArguments()); }
Example #30
Source File: Test8013416.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); Public<String, String> map = (Public) oldInstance; for (Entry<String, String> entry : map.getAll()) { String[] args = {entry.getKey(), entry.getValue()}; out.writeStatement(new Statement(oldInstance, "put", args)); } }