类java.beans.Statement源码实例Demo

下面列出了怎么用java.beans.Statement的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: openjdk-jdk9   文件: ClassForName.java
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");
    }
}
 
源代码2 项目: dragonwell8_jdk   文件: Test8013416.java
@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));
    }
}
 
源代码3 项目: dragonwell8_jdk   文件: Test8005065.java
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());
}
 
源代码4 项目: TencentKona-8   文件: Test8013416.java
@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));
    }
}
 
源代码5 项目: TencentKona-8   文件: Test8005065.java
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());
}
 
源代码6 项目: jdk8u60   文件: Test8013416.java
@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));
    }
}
 
源代码7 项目: jdk8u60   文件: Test8005065.java
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());
}
 
源代码8 项目: openjdk-jdk8u   文件: Test8013416.java
@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));
    }
}
 
源代码9 项目: openjdk-jdk8u   文件: Test8005065.java
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());
}
 
源代码10 项目: java-swing-tips   文件: MainPanel.java
@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));
    }
  }
}
 
源代码11 项目: openjdk-jdk8u-backup   文件: Test8005065.java
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());
}
 
源代码12 项目: java-swing-tips   文件: MainPanel.java
@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));
    }
  }
}
 
源代码13 项目: openjdk-jdk9   文件: Test8013416.java
@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));
    }
}
 
源代码14 项目: openjdk-jdk9   文件: Test8005065.java
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());
}
 
源代码15 项目: jdk8u-jdk   文件: Test8013416.java
@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));
    }
}
 
源代码16 项目: jdk8u-jdk   文件: Test8005065.java
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());
}
 
源代码17 项目: java-swing-tips   文件: MainPanel.java
@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));
    }
  }
}
 
源代码18 项目: hottub   文件: Test8013416.java
@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));
    }
}
 
源代码19 项目: hottub   文件: Test8005065.java
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());
}
 
源代码20 项目: openjdk-8-source   文件: Test8013416.java
@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));
    }
}
 
源代码21 项目: openjdk-8-source   文件: Test8005065.java
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());
}
 
源代码22 项目: gridgo   文件: ObjectUtils.java
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);
    }
}
 
源代码23 项目: openjdk-8   文件: Test8013416.java
@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));
    }
}
 
源代码24 项目: openjdk-8   文件: Test8005065.java
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());
}
 
源代码25 项目: jdk8u_jdk   文件: Test8013416.java
@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));
    }
}
 
源代码26 项目: jdk8u_jdk   文件: Test8005065.java
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());
}
 
源代码27 项目: jdk8u-jdk   文件: Test8013416.java
@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));
    }
}
 
源代码28 项目: jdk8u-jdk   文件: Test8005065.java
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());
}
 
源代码29 项目: jdk8u-dev-jdk   文件: Test8013416.java
@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));
    }
}
 
源代码30 项目: jdk8u-dev-jdk   文件: Test8005065.java
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());
}
 
 类所在包
 类方法
 同包方法